一. 练习:用户 增删改查 脚本 编写一个脚本,实现如下功能 
1 2 3 4 5 6 7 8 9 10 11 12 ==================== 1.增加用户并设置密码 2.删除用户 3.查看用户 4.退出 ==================== 输入的指定不是1-4,给提示给予提醒,并且如果不输入退出的话,可以循环添加。 按1  增加用户,并且设置密码 	useradd  passwd 按2  删除用户    			 userdel -r  按3  查看用户   				 id  按4  退出       			  exit ===================================================================== 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 示例1: -------------------------------------------------------------------------------------------- menu  (){									echo  "====================" echo  "1.增加用户并增加密码" echo  "2.删除用户" echo  "3.查看用户" echo  "4.退出" echo  "====================" read  -p "请选择您所需要的服务:"  ser} ------------------------------------------------- create_user  (){							    read  -p "创建用户名:"  user1     id  $user1  &>/dev/null && echo  "用户已存在!"  && return 	     useradd $user1  &>/dev/null				     id  $user1  &>/dev/null || return  	     read  -s -p "设置密码:"  passwd1			     echo  $passwd1 |passwd $user1  --stdin &>/dev/null } ----------------------------------------------------------- while  :do menu				 case  $ser  in 			1)     clear			     create_user     ;; 2) 4)     echo  “退出!”     exit      ;; *)							     echo  “请输入1-4!” esac done ----------------------------------------------------------------------------------------------------------- 示例2:if  语法 ---------------------------------------------------------------------     if  ["$options " ==1]||["$options " ==2]||["$options " ==3]||["$options " ==4]     then          case  $options  in          1)             read  -p "请输入用户名:"  username             if  id  $username  &>/dev/null             then                  echo  "$username  is exist!"              else                  read  -s -p "请设置密码:"  password                 useradd $username  &>/dev/null                 echo  $password  | $username  --stdin &>/dev/null                 echo  -e "\n create $username  ok!"              fi               ;;              4)             echo  "退出!"              exit          esac      else          echo  "请输入数字1或2或3或4!"      fi  
1 2 3 4 5 6 7 8 9 10 11 12 补充:&&可以连接2个命令 -------------------------------------------------------------------- &&可以连接2个命令 [root@sanchuang-linux ~]# id  chen222 uid=1017(chen222) gid=1017(chen222) 组=1017(chen222) [root@sanchuang-linux ~]# id  chen222 && echo  "chen222存在"  uid=1017(chen222) gid=1017(chen222) 组=1017(chen222) chen222存在 [root@sanchuang-linux ~]# id  chen222 &>/dev/null && echo  "chen222存在"  chen222存在 
二. 变量 变量 全局/局部 
Shell Shell中定义的变量 默认全局变量
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 =========================================================================================== local  a=10 局部变量示例1:local  局部变量 -------------------------------------------------------------------------------------------- func01  (){    local  a=10 } func01								 echo  $a -------------------------------------------------------------------------------------------- [root@sanchuang-linux chenpeng]# sh aaa.sh  									 ============================================================================================ 示例2:默认全局变量 -------------------------------------------------------------------------------------------- func01  (){    a=10 } func01								 echo  $a [root@sanchuang-linux chenpeng]# sh aaa.sh  10									 
Python Python定义的变量 默认局部变量
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 =========================================================================================== global  a 全局变量示例1 :global  a 全局变量 -------------------------------------------------------------------------------------------- def  func01 ():    global  a 				     a = 10  func01() print (a)[root@sanchuang-linux ~] 10 ============================================================================================ 示例2 :默认局部变量  只能在函数体内使用的变量 -------------------------------------------------------------------------------------------- def  func01 ():    a = 10  func01() print (a)[root@sanchuang-linux ~] Traceback (most recent call last):   File "python_hanshu.py" , line 5 , in  <module>     print (a) NameError: name 'a'  is  not  defined				 
Shell函数里传参(位置变量) shell函数里传参(位置变量)
1 2 3 4 5 6 7 8 9 示例: -------------------------------------------------------------------------------------------- Shell里传参 func01  (){    a=100     echo  "$1  $2  $3 " 						 } func01 第一个参数 第二个参数 第三个参数		 echo  $a 
Python里传参 python里传参
1 2 3 4 5 6 7 8 示例:python里传参 -------------------------------------------------------------------------------------------- def  func01 (x,y ):    global  a     a = 10  func01(1 ,2 ) print (a)
三. test test判断 等同于[] 
1 2 3 4 5 6 7 示例:test  -------------------------------------------------------------------------------------------- [root@sanchuang-linux chenpeng]# a=123 [root@sanchuang-linux chenpeng]# b=123 [root@sanchuang-linux chenpeng]# test  a==b [root@sanchuang-linux chenpeng]# test  a==b && echo  ok ok 
四. 判断方式 [] [[]] (()) test 判断方式 [] [[]] (()) test 
1 2 3 4 5 6 7 8 示例:test  --------------------------------------------------------------------- [root@sanchuang-linux ~]# a=123 [root@sanchuang-linux ~]# b=123 [root@sanchuang-linux ~]# test  a==b && echo  ok ok [root@sanchuang-linux ~]# test  a==b && echo  ok || echo  error ok 
五. 连接运算 连接运算 
使用分号(;)实现一行中写多条语句
1 2 3 4 5 示例: -------------------------------------------------------------------------------------------- [root@sanchuang-linux chenpeng]# echo  "abc" ;echo  "xyz"  abc xyz 
六. 函数 函数的定义/使用 1 2 3 4 5 6 7 示例 -------------------------------------------------------------------------------------------- add  (){    echo  “两数相加为:$(( $num1  + $num2  ))” } add ============================================================================================ 
函数的传参 1 2 3 4 5 6 7 8 9 10 11 12 示例:位置参数传参 -------------------------------------------------------------------------------------------- func01  (){    a=100     echo  "$1  $2  $3 "  } func01 第一个参数 第二个参数 第三个参数 echo  $a ============================================================================================ ·函数内的变量定义 	  默认为全局变量 ·使用local 关键字 	可以转换为局部变量 
七. seq seq命令 
seq命令 类似于 python中的range函数
用途:**打印出一串有序的数字 **
格式:seq [选项] 数字范围
-s:指定分隔符 
-w:指定同等宽带输出 
----------------------------------------
数字范围的展示:
[start] [step] end
start 和 step 都是选填的
step 为正,表示从小到大输出
step 为负,表示从大到小输出
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 示例1:[start] [step] end -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# seq  3 -1 1			 3 2 1 [root@sanchuang-linux ~]# seq  1 2 6 1 3 5 [root@sanchuang-linux ~]# seq  1 -2 6			 [root@sanchuang-linux ~]# seq  6 -2 1 6 4 2 示例2:# seq  2 5  -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# seq  2 5 2 3 4 5 [root@localhost ~]# seq  -w 9 12			 09 10 11 12 ============================================================================================ 补充 获取命令的返回结果 ·使用反引号 `` ·或者 $() 示例3:获取/etc/passwd最后一行,赋给一个变量 [root@sanchuang-linux ~]# tail  -n1 /etc/passwd				 wtc:x:1029:1029::/home/wtc:/bin/bash [root@sanchuang-linux ~]# line=`tail  -n1 /etc/passwd`		 [root@sanchuang-linux ~]# echo  $line  wtc:x:1029:1029::/home/wtc:/bin/bash [root@sanchuang-linux ~]# line1=$(tail  -n1 /etc/passwd)		 [root@sanchuang-linux ~]# echo  $line1  wtc:x:1029:1029::/home/wtc:/bin/bash ============================================================================================ 示例4:seq 命令 类似于 python中的range函数 -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# vim seq_test.sh for  i in  `seq  2 10`		do 						    echo  $i  done ----------------------------------------------------------------------- for  i in  $(seq  2 10)	do     echo  $i  done [root@sanchuang-linux ~]# bash seq_test.sh  2 3 4 5 6 7 8 9 10 ============================================================================================ 示例5:-s:指定分隔符 -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# seq  -s "+"  10			 1+2+3+4+5+6+7+8+9+10							 [root@sanchuang-linux ~]# seq  10				 1 2 3 4 5 6 7 8 9 10 
八. 练习:创建用户 创建用户(3次重试机会)脚本 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 示例:seq 命令  创建失败 重试 -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# vim user_add.sh add  (){    for  i in  `seq  3 -1 1`				     do          echo  "增加用户"          read  -p "请输入用户名:"  username        id  $username  &>/dev/null && echo  "用户已存在,还有$(( $i - 1) )次机会"  && continue                                                         if  useradd $username  &>/dev/null        then             echo  "创建${username} 成功!"             read  -s -p "请设置密码:"  password            echo  $password  | passwd $username  --stdin &>/dev/null            break         else             echo  "创建失败!,还有$(($i-1) )次机会!"         fi      done  } del  (){    echo  "删除用户"      read  -p "请输入用户名:"  username     userdel -r $username  &>/dev/null && echo  "删除成功!"  || echo  "用户不存在,删除失败!"  } seek  (){    echo  "查看用户"      read  -p "请输入用户名:"  username     id  $username   } echo  "#############################" echo  "按1  增加用户,并且设置密码" echo  "按2  删除用户" echo  "按3  查看用户" echo  "按4  退出" echo  "#############################" while  :do     read  -p "请输入你的选择:"  options     case  $options  in      1)         add         ;;     2)         del         ;;     3)         seek         ;;     4)         echo  "退出!"          exit          ;;     *)         echo  "请输入指定内容 1-4!"      esac  done 
九. 循环获取文件或者命令输出的内容(3种) 重定向 1 2 3 4 5 6 7 8 示例1:重定向  while  read  a b c	; < a.txt -------------------------------------------------------------------------------------------- while  read  a b cdo    echo  "name is $a , sex is $b , age is $c  "  done  < a.txt					============================================================================================ 
管道符号 1 2 3 4 5 6 7 示例2:管道符号	cat  a.txt | while  read  a b c -------------------------------------------------------------------------------------------- cat  a.txt | while  read  a b cdo      echo  "name is $a , sex is $b , age is $c  "  done ============================================================================================ 
for循环 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 示例3:for  循环实现(注:使用for 循环去做,不太好) -------------------------------------------------------------------------------------------- echo  "for 循环实现..........." for  i in  `ls `					do     echo  $i  done -------------------------------------------------------------------------------------------- 示例3.2:i代表文件的每一项,以空白分割 [root@sanchuang-linux ~]# vim file_test.sh for  i in  `cat  a.txt`do     echo  $i  done [root@sanchuang-linux ~]# bash file_test.sh  wenyao f 18 chenpeng m 19 wtc f 17 [root@sanchuang-linux ~]# cat  a.txt  wenyao f 18 chenpeng m 19 wtc f 17 示例3.3:for  i in  `ls  -al`		 
十. 练习:找出list.xml中主机为ZF的行然后循环输出ip与区服对应的关系 找出list.xml中主机为ZF的行然后循环输出ip与区服对应的关系 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 示例 -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# cat  list.xml  127.0.0.1 ZF-1      1 33 49 57 127.0.0.1 ZF-11     65 67 69 127.0.0.1 HF-1      22 34 6 127.0.0.1 HF-11     6 17 36 127.0.0.1 ZF-12     1 2 127.0.0.1 HF-1      34 7 -------------------------------------------------------------------------------------------- 步骤1:首先过滤出ZF所在的行 [root@sanchuang-linux ~]# vim test6.sh  cat  list.xml |grep ZF |while  read  ip host qufu		do 											    echo  "ip:$ip , qufu:$qufu " 					 done [root@sanchuang-linux ~]# cat  list.xml | grep ZF 127.0.0.1 ZF-1      1 33 49 57 127.0.0.1 ZF-11     65 67 69 127.0.0.1 ZF-12     1 2 [root@sanchuang-linux ~]# sh test6.sh 			 ip:127.0.0.1, qufu:1 33 49 57					 ip:127.0.0.1, qufu:65 67 69						 ip:127.0.0.1, qufu:1 2							 -------------------------------------------------------------------------------------------- 步骤2:套个循环 cat  list.xml |grep ZF |while  read  ip host qufudo     for  i in  $qufu 								     do          echo  "ip:$ip , qufu:$i " 					     done  done [root@sanchuang-linux ~]# sh test6.sh  ip:127.0.0.1, qufu:1 ip:127.0.0.1, qufu:33 ip:127.0.0.1, qufu:49 ip:127.0.0.1, qufu:57 ip:127.0.0.1, qufu:65 ip:127.0.0.1, qufu:67 ip:127.0.0.1, qufu:69 ip:127.0.0.1, qufu:1 ip:127.0.0.1, qufu:2 
十一. 循环获取文件或者命令输出的内容 循环获取文件或者命令输出的内容 
while read的参数 可以接任意个,默认还是以空白分割
如果参数没有对应获取的值,那参数就为空
如果文件中空白分割的参数大于read接受的参数,那多出的参数都会赋给最后一个read接受的参数
十二. shell中的一维数组 shell中的一维数组 
shell中的一维数组 使用 定义:使用圆括号,中间以 空格 作为分隔符 博客连接:https://www.cnblogs.com/tangshengwei/p/5446315.html 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 示例14.1:定义、索取 -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# a=(xx yy zz)			 [root@sanchuang-linux ~]# a=(xx yy zz ff)		 [root@sanchuang-linux ~]# echo  ${a[0]} 			 xx [root@sanchuang-linux ~]# echo  ${a[1]} 			 yy [root@sanchuang-linux ~]# echo  ${a[3]}  ff [root@sanchuang-linux ~]# echo  ${a[@]} 			 xx yy zz ff										 [root@sanchuang-linux ~]# echo  ${a[@]:1:4} 		 yy zz ff -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# a=(xx yy zz ff) [root@sanchuang-linux ~]# echo  $a 			 xx [root@sanchuang-linux ~]# echo  ${a[*]} 		 xx yy zz ff [root@sanchuang-linux ~]# echo  ${a[@]} 		 xx yy zz ff [root@sanchuang-linux ~]# echo  ${a:0:4} 		 xx [root@sanchuang-linux ~]# echo  ${a:1:4} 		 x [root@sanchuang-linux ~]# echo  ${a[*]:1:3} 	 yy zz ff -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# a=(1 2 3 4) [root@sanchuang-linux ~]# echo  ${a[*]:1:3} 	 2 3 4 ============================================================================================ 获取长度(元素个数) 示例14.2:获取一位数组长度(元素个数) -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# echo  ${#a[*]} 			 4 [root@sanchuang-linux ~]# echo  ${#a[@]}  4 [root@sanchuang-linux ~]# echo  ${#a} 			 2 示例14.3:获取字符串长度 echo  ${#b}  [root@sanchuang-linux ~]# b=abc [root@sanchuang-linux ~]# echo  ${#b}  3 ============================================================================================ 修改/删除 元素(shell里面一维数组的修改/删除) 示例14.4:修改/删除 元素 [root@sanchuang-linux ~]# echo  ${a[*]}  xx yy zz ff [root@sanchuang-linux ~]# a[3]="hh" 					 [root@sanchuang-linux ~]# echo  ${a[*]}  xx yy zz hh											 [root@sanchuang-linux ~]# unset  a[3]				 [root@sanchuang-linux ~]# echo  ${a[*]}  xx yy zz -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# echo  ${a[*]}  xx zz [root@sanchuang-linux ~]# unset  a[1]				 [root@sanchuang-linux ~]# echo  ${a[*]}  xx zz [root@sanchuang-linux ~]# echo  ${!a[*]} 				 0 2				 [root@sanchuang-linux ~]# unset  a[2]				 [root@sanchuang-linux ~]# echo  ${a[*]}  xx [root@sanchuang-linux ~]#  
十三. linux里 生成随机数 linux里 生成随机数 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 示例 -------------------------------------------------------------------------------------------- [root@sanchuang-linux ~]# echo  $RANDOM  		 15386 [root@sanchuang-linux ~]# echo  $RANDOM   24960 知识点15.2 生成指定范围内的随机数 示例1:产生10以内的随机数(不含10) [root@sanchuang-linux ~]# echo  $(($RANDOM  % 10 ))  1 [root@sanchuang-linux ~]# echo  $(($RANDOM  % 10 ))  8 [root@sanchuang-linux ~]# echo  $(($RANDOM  % 10 ))  2 [root@sanchuang-linux ~]# echo  $(($RANDOM  % 10 ))  3 
十四. 练习:编写一个随机抽取同学唱歌的程序,如果唱过了,就不能再次被抽到了 编写一个随机抽取同学唱歌的程序,如果唱过了,就不能再次被抽到了 
1、编写一个文件,里面存放我们歌手的名字 name.txt
2、随机抽取歌手 # 1.循环抽取 2.抽到了就丢掉
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 ============================================================================================ 示例 -------------------------------------------------------------------------------------------- [root@sanchuang-linux chenpeng]# vim geshou_test.sh singers=(`cat  name.txt`)					 echo  ${singers[@]} 			total=${#singers[@]} 						 for  i in  `seq  $total `						do 											    read  -p "请输入任意键进行抽取" 			           random_num=$(( $RANDOM  % ${#singers[*]}  ))		     echo  "随机数为:$random_num " 				     echo  "有请${singers[$random_num]} 献唱一首!大家热烈欢迎!"      unset  singers[$random_num ]				     singers=(`echo  ${singers[@]} `)			     echo  "未献唱者具体名单为: ${singers[@]} " 	  done 										[root@sanchuang-linux chenpeng]# cat  name.txt 	 fengcheng zhanghuayou pengyifan chenpeng xulilin tangliangfei wangtiancheng lixinhai liangluyao -------------------------------------------------------------------------------------------- 演示 [root@sanchuang-linux chenpeng]# sh geshou_test.sh  fengcheng zhanghuayou pengyifan chenpeng xulilin tangliangfei wangtiancheng lixinhai liangluyao 请输入任意键进行抽取 随机数为:2 有请pengyifan献唱一首!大家热烈欢迎! 未献唱者具体名单为: fengcheng zhanghuayou chenpeng xulilin tangliangfei wangtiancheng lixinhai liangluyao 请输入任意键进行抽取 随机数为:2 有请chenpeng献唱一首!大家热烈欢迎! 未献唱者具体名单为: fengcheng zhanghuayou xulilin tangliangfei wangtiancheng lixinhai liangluyao 
十五. 练习:产生5–10之间随机数 产生5–10之间随机数 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 产生5--10之间随机数 [root@sanchuang-linux chenpeng]# echo  $(( $RANDOM  % 10  ))		 3 [root@sanchuang-linux chenpeng]# echo  $(( $RANDOM  % 5  +5  ))		 6 [root@sanchuang-linux chenpeng]# echo  $(( $RANDOM  % 5  +5  )) 8 -------------------------------------------------------------------------------------------- 50--150之间随机数 [root@sanchuang-linux chenpeng]# echo  $(( $RANDOM  % 100  +50  )) 79                                                     -------------------------------------------------------------------------------------------- 150-200之间随机数                       [root@sanchuang-linux ~]# echo  $(( $RANDOM  % 50  + 150  ))	 190 
十六. tr(替换命令) tr命令(替换命令) 
tr命令(主要用来做字符的替换) # 注:对文本处理常用
----------------------------------------------------
使用tr转换字符
tr SET1 SET2
用SET2中的字符替换掉SET1中同一位置的字符
tr -d 删除指定字符 tr -s 压缩相同字符,将连续的指定字符压缩成一个字符 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 示例 -------------------------------------------------------------------------------------------- 示例1:替换 [root@sanchuang-linux chenpeng]# echo  123456| tr  345 xyz	 12xyz6														 [root@sanchuang-linux chenpeng]# echo  123456| tr  3 xyz		 12x456														 															 															 ============================================================================================ 示例2:删除  tr  -d  删除指定字符[root@sanchuang-linux chenpeng]# echo  123456| tr  3 "" 		 tr : 当不截断设置1 时,字符串2 不能为空[root@sanchuang-linux chenpeng]# echo  123456| tr  -d 34		 1256 ============================================================================================ tr  -s  压缩相同字符,将连续的指定字符压缩成一个字符将连续的指定字符压缩成一个字符 示例3:tr  -s  压缩相同字符 [root@sanchuang-linux chenpeng]# echo  111223333444445556666| tr  -s 34 11122345556666												 [root@sanchuang-linux chenpeng]# echo  11122333344444555666633377744| tr  -s 34 1112234555666637774											 ============================================================================================ 练习4:把环境变量里 : 替换成空格								    [root@sanchuang-linux chenpeng]# echo  $PATH  |tr  ":"  " " 		 /lianxi/sc /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /root/bin /usr/local/nginx/sbin /root/bin /usr/local/nginx5/sbin /root/bin ============================================================================================ 扩展5:替换文件里的内容,生成一个新文件 示例:将/etc/passwd里的 :替换成空格 -------------------------------------------------------------------------------------------- 写法1:cat 导入 [root@sanchuang-linux chenpeng]# cat  /etc/passwd |tr  ":"  " "  >/tmp/passwd [root@sanchuang-linux chenpeng]# less /tmp/passwd 			 写法2:tr 接收标准输入  重定向标准输入 tr  ":"  " "  </etc/passwd [root@sanchuang-linux chenpeng]# tr  ":"  " "  </etc/passwd  >/tmp/passwd2  [root@sanchuang-linux chenpeng]# less /tmp/passwd2			 ============================================================================================ 扩展5.1 重定向标准输入 [root@sanchuang-linux chenpeng]# wc  -l /etc/passwd			 52 /etc/passwd 示例:重定向标准输入 [root@sanchuang-linux chenpeng]# wc  -l < /etc/passwd 52