If I have a string variable who\'s value is \"john is 17 years old\" how do I tokenize this using spaces as the delimeter? Would I use awk?
\"john is 17 years old\"
awk
you can try something like this :
#!/bin/bash n=0 a=/home/file.txt for i in `cat ${a} | tr ' ' '\n'` ; do str=${str},${i} let n=$n+1 var=`echo "var${n}"` echo $var is ... ${i} done