i'm working on a script that needs to read the variable $1, one character at a time and assign those characters to an array. i tried to use this line:
however, everytime i try to read the variable $chars with echo ${chars[*]}, it turns up empty.Code:echo $1 | read -n 1 -a chars
please help.


LinkBack URL
About LinkBacks

Reply With Quote
