Need Help on a bash script
Hi guys, basically i need to check if the 2nd column of /etc/passwd contains "x". If it contain "x", print "exception:no" if it doesn't ( blank), print "exception yes"
I need to check the whole of /etc/passwd.
im trying to use if else or for loop. grep and awk is also accepted if i can get it to work.
I tried doing awk but while it does work, it prints out "no" for every user that does have an "x" in 2nd column of their line, and "yes" for every user that does not have "x" in 2nd column of their line.
I just need one yes or no.
Any help?