Date: Fri, 9 Nov 2001 19:48:42 +0300 From: Odhiambo Washington <wash@wananchi.com> To: FBSD-Q <freebsd-questions@freebsd.org> Subject: Help with AWK Message-ID: <20011109194842.E27386@ns2.wananchi.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hello list,
I am stuck with awk.
What I need to do is for awk to read the /etc/master.passwd file and give me a line like
this one below for users whose GID=20 or GID=0
I am not able to get the "\" after the ".*" and the $ after wananchi.com and I am also not able to get this done for
users in GID=0
^user2@.*\.wananchi.com$:1234:$1$Tz.OjMPg$5j5pGgjfUHFNlJaSLsr5P/:
The command I use is:
awk -F ":" '{if ($$4==20) {print "^"$$1"@.*.wananchi.com"":"$$3":"$$2":"}}' < /etc/master.passwd > some_file
-Wash
S y s t e m s A d m i n i s t r a t o r
--
~\\_
Odhiambo Washington \\\\
Wananchi Online Ltd., `\\\\\
1st Flr Loita Hse, Loita Street |\\\\\
PO Box 10286,00100-NAIROBI,KE. \\\\\|__.--~~\
Fax: 254 2 313985-9 _--~ /
Fax: 254 2 313922 /~ ////// _-~~~~'
E-mail: wash@wananchi.com ('-//////-//
URL : http://www.wananchi.com //////(((-)
GSM: 254 72 743 223 / 254 733 744 121 /////"
_///"
+++
Don't be humble ... you're not that great.
-- Golda Meir
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org
iD8DBQE77Ajqn7LIsuxjem8RAmNAAJ0dcKmEon7aIhB95eu3++JtTZLsiQCgtJup
fb/blxjis5t3XdDKqkquckA=
=5dX4
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011109194842.E27386>
