Hello, I've got a script which uses an array, something like this:
Code:
array_1=("test-1" "test-2" "test-3")
but under some conditions (I don't know the conditions), if I use 'for', like this:
Code:
for item in ${array_1[@]}; do
some_code
done
it doesn't go properly thru the array, is it possible that character '-' can influence the code?
If I drop '-' from the item of the array, it behaves properly. I can't really explain better then this, coz I can't see the issue and can't figure out if this is due to '-' in the items or just weird /bin/sh or /bin/bash issue.
Thanks!