11
rated 0 times
[
11]
[
0]
/ answers: 1 / hits: 790
/ 2 Years ago, sun, december 5, 2021, 4:01:43
I have a script.
I want to get all my regular users from /etc/shadow
e.g all users which second term in shadow file begins with $
or !$
.
My pattern is
sudo getent shadow | awk -F: '$2 ~ /^$/ || /^!$/ {print $1}'
It doesn't work for now.
More From » bash