May 292009
cat /etc/passwd|while read line; do
IFS=”:”
read username pass auid agid agroup ahome ashell<<EOF
$line
EOF
echo $username
echo $pass
echo $auid
echo $agid
echo $agroup
echo $ahome
echo $ashell
echo “--------”
done
Simplified version
IFS=”:”
read first_name last_name< <(echo “Jeff:Price”)
you could use this method on a never ending stream of data
Thats all for now.
Incoming search terms:
-
Scott M
-
Jeff Price
-
garywk
-
xleo