[root@localhost ~]# vim user.sh 1 #!/bin/bash 2 for i in `cut -d ":" -f1 /etc/passwd`; 3 do 4 echo -e "Hello User:" " 33[31m$i 33[0m" "shell is" " 33[33 m`grep $i /etc/passwd|cut -d ":" -f7` 33[0m""." 5 done