This is where I post snippets of information about Information Technology. It is mostly for my own reference but I hope that others will find it useful and comments are welcome.
Friday, March 02, 2012
dealing with spaces in shell script for loops
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for policy in `/usr/SD/bin/nrcmd -r -N doofus -P 1234 policy listnames`
do
echo "$policy"
done
IFS=$SAVEIFS
No comments:
Post a Comment