Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash split a word into characters

ss="abcdefghi"
my_array=( `echo $ss | grep -o . ` )

echo ${my_array[2]} 

give c

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bash #split #word #characters
ADD COMMENT
Topic
Name
1+3 =