I am getting all the lines as output. The if condition of the following code is not working.
grep -Ev '^(halt|sync|shutdown)' /etc/passwd | awk -F: '{\
if("$7"!="$(which nologin)") \
{ print $0; } \
}'
I tried with different if conditions:
This is also returning all the values.
if("$1"!="usbmux") \
{ print $1; } \
But this is not returning anything even though there is one usbmux entry in $1.
if("$1"=="usbmux") \
{ print $1; } \