#
# changing the IFS value
#
IFS=$'\n'
#
for entry in $( cat /etc/passwd )
do
echo "Values in $entry -"
IFS=:
for value in $entry
do
echo " $value"
done
done
#
#
Results:
Values in root:x:0:0:root:/root:/bin/bash -
root
x
0
0
root
/root
/bin/bash
[...]
No comments:
Post a Comment