Answers for "array is bash"

1

bash array

ss="abcdefghi"
my_array=( `echo $ss | grep -o . ` ) # split word into array

echo ${my_array[2]} 
give c

i=0
echo ${my_array[$i]}${my_array[$i+1]}xxx
give : abxxx
Posted by: Guest on August-23-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language