1: Say hello to each user in the/etc/passwd directory, and indicate its UID number! (Eg:hello,root,your uid is 0)
2: How many accounts does this script share?
#!/bin/bash
a= "/etc/passwd"
b= "/root/b"
if awk-f: ' {print ' Hello, ' $ ', ' ' Your UID is ' $ $ ' $a > $b
Then
Cat $b
awk ' {print $} ' $b |wc-l
fi
[[Email protected] ~]# sh AAA
Hello,root, your UID is 0
Hello,bin, your UID is 1
Hello,daemon, your UID is 2
Hello,adm, your UID is 3
HELLO,LP, your UID is 4
Hello,sync, your UID is 5
Hello,shutdown, your UID is 6
Hello,halt, your UID is 7
Hello,mail, your UID is 8
HELLO,UUCP, your UID is 10
Hello,operator, your UID is 11
Hello,games, your UID is 12
Hello,gopher, your UID is 13
HELLO,FTP, your UID is 14
Hello,nobody, your UID is 99
HELLO,VCSA, your UID is 69
Hello,saslauth, your UID is 499
Hello,postfix, your UID is 89
HELLO,SSHD, your UID is 74
Hello,mysql, your UID is 500
HELLO,PHP-FPM, your UID is 501
HELLO,NTP, your UID is 38
Hello,named, your UID is 25
Hello,zabbix, your UID is 498
Hello,memcached, your UID is 497
Hello,redis, your UID is 503
Hello,mailnull, your UID is 47
Hello,smmsp, your UID is 51
28
This article is from the "Steven Never give Up" blog, please be sure to keep this source http://wsw26.blog.51cto.com/1442148/1755056
Simple account Search