显示姓名和密码

#!/bin/bash
IFS=:
while read name pass uid gid gecos home shell
do
        echo "******************************************"
        echo "name  :     $name"
        echo "pass  :     $pass"
        echo "uid  :     $uid"
        echo "gid  :     $gid"
        echo "gecos  :     $gecos"
        echo "home  :     $home"
        echo "shell  :     $shell"
done
        


命令行:

# ./showpash.sh < /etc/passwd

你可能感兴趣的:(密码)