Skip site navigation (1)Skip section navigation (2)
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

--H+4ONPRPur6+Ovig
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello list,

I am stuck with awk.

What I need to do is for awk to read the /etc/master.passwd file and give m=
e a line like
this one below for users whose GID=3D20 or GID=3D0

I am not able to get the "\" after the ".*" and the $ after wananchi.com an=
d I am also not able to get this done for
users in GID=3D0

^user2@.*\.wananchi.com$:1234:$1$Tz.OjMPg$5j5pGgjfUHFNlJaSLsr5P/:

The command I use is:

        awk -F ":" '{if ($$4=3D=3D20) {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
--
                                              ~\\_                =20
 Odhiambo Washington                            \\\\              =20
 Wananchi Online Ltd.,                          `\\\\\            =20
 1st Flr Loita Hse, Loita Street                 |\\\\\           =20
 PO Box 10286,00100-NAIROBI,KE.                   \\\\\|__.--~~\  =20
 Fax: 254 2 313985-9                           _--~            /  =20
 Fax: 254 2 313922                           /~ //////  _-~~~~'   =20
 E-mail: wash@wananchi.com                  ('-//////-//          =20
 URL	: http://www.wananchi.com            //////(((-)          =20
 GSM: 254 72 743 223 / 254 733 744 121     /////"                 =20
                                        _///"                     =20

+++
Don't be humble ... you're not that great.
		-- Golda Meir

--H+4ONPRPur6+Ovig
Content-Type: application/pgp-signature
Content-Disposition: inline

-----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-----

--H+4ONPRPur6+Ovig--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011109194842.E27386>