Possible Duplicate:
Split string based on delimiter in bash?
i have a shell script which call by php and pass a variable ($1)
When i using MYVAR = $1, and echo MYVAR is not working
how can i assign this variable ($1) to another variable and split it with delimiter “,” and convert it into a array for looping?
Well, guessed answer in absence of code.
Variable assignments in shell scripts must be:
Spaces around are incorrect:
And the echo must output an actual variable, using the
$prefix:Not just the literal string: