查看本地用户shell
1 #!/bin/bash
2 #用途: www.2cto.com
3查看本地用户shell
4 line=`cat /etc/passwd|grep $1`
5 if [ $? -eq 0 ];then
7 else
8 echo "Not user "
10 fi
11 oldIFS=$IFS;
12 IFS=":"
14 for item in $line;
15 do
16 [ $count -eq 0 ] && user=$item;
17 [ $count -eq 6 ] && shell=$item;
18 let count++
19 done;
20 IFS=$oldIFS
21 echo $1\`s shell is $shell;
查看更多关于查看本地用户shell - Linux操作系统:Ubuntu_Centos_D的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did21587