cat /etc/passwd | awk -F: ‘ |
NF !=7{
printf(“line %d,not have 7fields:%sn”,NR,$0)}
$1 !~ /[A-Za-z0-9]/{printf(“line %d,no alpha and num userid:%d: %sn”,NR,NR,$0)}
$2 == “*” {printf(“line %d,no pass :%sn”,NR,$0)}’
cat /etc/passwd | awk -F: ‘ |
NF !=7{
printf(“line %d,not have 7fields:%sn”,NR,$0)}
$1 !~ /[A-Za-z0-9]/{printf(“line %d,no alpha and num userid:%d: %sn”,NR,NR,$0)}
$2 == “*” {printf(“line %d,no pass :%sn”,NR,$0)}’