while read from file
$ cat n2while
while read mess
do echo $mess
date
done < /etc/group | grep ubuntu
$ bash n2while
adm:x:4:syslog,ubuntu2
cdrom:x:24:ubuntu2
sudo:x:27:ubuntu2
dip:x:30:ubuntu2
plugdev:x:46:ubuntu2
lpadmin:x:108:ubuntu2
ubuntu2:x:1000:
sambashare:x:124:ubuntu2
while read mess
do echo $mess
date
done < /etc/group | grep ubuntu
$ bash n2while
adm:x:4:syslog,ubuntu2
cdrom:x:24:ubuntu2
sudo:x:27:ubuntu2
dip:x:30:ubuntu2
plugdev:x:46:ubuntu2
lpadmin:x:108:ubuntu2
ubuntu2:x:1000:
sambashare:x:124:ubuntu2
Comments
Post a Comment