Date: Sat, 10 Nov 2001 09:42:34 +0300 From: Odhiambo Washington <wash@wananchi.com> To: smorton@acm.org Cc: FBSD-Q <freebsd-questions@freebsd.org> Subject: Re: Help with AWK Message-ID: <20011110094234.B1578@ns2.wananchi.com> In-Reply-To: <3BEC628A.5050005@verizon.net> References: <20011109194842.E27386@ns2.wananchi.com> <3BEC628A.5050005@verizon.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
* Simon Morton <simon.morton@verizon.net> [20011110 02:17]: writing on the =
subject 'Re: Help with AWK'
| If I understand correctly, the following should do it:
|=20
| awk -F: '$4=3D=3D40{printf "^%s@.*\\.wananchi.com$:%s$:%s/:\n",$1,$3,$2;}'
|=20
Hello Simon,
That is not it ;). That line gives the following:
#^user@.*\.wananchi.com3552YZb2gtYJeEZ1Y/:
What I want (from master.passwd) are the following fields with the extras
^$1@.*\.wananchi.com$:$3:$2:
$1 =3D login id
$2 =3D encrypted passwd
$3 =3D numerical UID
All with colon as the separator.
I need to extract those details for two groups of users - staff (GID=3D=3D2=
0) and wheel (GID=3D=3D0),
all in one command, if possible.
-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
+++
Religion has done love a great service by making it a sin.
-- Anatole France
--gBBFr7Ir9EOA20Yy
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
iD8DBQE77Mxan7LIsuxjem8RAqV/AKCurPeuYbBg/mrftVty6q+dcCSCBwCghdGa
Rqhq/FVD5AjWYVDODjMQqQk=
=eTcV
-----END PGP SIGNATURE-----
--gBBFr7Ir9EOA20Yy--
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?20011110094234.B1578>
