Python help
Derek Martin
invalid at pizzashack.org
Thu Feb 5 11:06:10 EST 2004
On Thu, Feb 05, 2004 at 10:47:56AM -0500, Paul Lussier wrote:
> Obviously a quite rudimentary script, which at this point does nothing
> more than re-create the /etc/group file in sorted order and removes
> the passwd field.
>
> I'd like to see/hear others ideas on how to write this same script.
> I'm most interested in improvements or commentary on why what I did
> is either right, wrong, interesting, stupid, etc.
>
> I'm not overly interesting in shell, perl, tcl, or other language solutions
Then, how about a python script to feed the group file to awk to get
rid of the password field, then pipe the results to sort? Granted,
this doesn't go a long way to teaching you python, but it does save a
whole lot of typing... If you don't already know how to do that in
python, it might still be a worthwhile exercise, too. The resulting
script, I would imagine, would probably be less than 5 lines, and
perhaps as few as 1. Though, since I don't know a lick of python, I
can't really say. :)
--
Derek D. Martin
http://www.pizzashack.org/
GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.
Replying to it will result in undeliverable mail.
Sorry for the inconvenience. Thank the spammers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20040206/bbc61c70/attachment.bin
More information about the gnhlug-discuss
mailing list