Tuesday, February 14, 2012

linux:shell Loop on a space delimited varialble


var="string with spaces"

# note that $var must NOT be quoted here!
for X in $var
do
    echo "$X"
done

No comments:

Post a Comment