kbjradmin
New Member
- Messages
- 512
- Reaction score
- 2
- Points
- 0
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.
please help.
Code:
echo $1 | read -n 1 -a chars
[*]}, it turns up empty.
please help.