1 개요[ | ]
- syntax error: unexpected "("
Console
Copy
# cat a.sh
ARR=("John Smith" "Jane Doe" "Mike Barnes" "Kevin Patterson")
for VALUE in "${ARR[@]}"; do
echo "[$VALUE]"
done
Console
Copy
# sh a.sh
a.sh: line 1: syntax error: unexpected "("
Console
Copy
# cat a.sh
set -- "John Smith" "Jane Doe" "Mike Barnes" "Kevin Patterson"
while [ $# -gt 0 ]; do
echo [$1]
shift;
done
Console
Copy
# sh a.sh
[John Smith]
[Jane Doe]
[Mike Barnes]
[Kevin Patterson]
2 같이 보기[ | ]
3 참고[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.