Sam Trenholme's webpage
This article was posted to the Usenet group alt.hackers in 1995; any technical information is probably outdated.

Re: A challenge for UNIX wizards


Article: 7917 of alt.hackers
From: chris@stallion.oz.au (Christopher Biggs)
Newsgroups: alt.hackers
Subject: Re: A challenge for UNIX wizards
Date: 31 May 1995 09:48:47 +1000
Organization: Stallion Technologies, Brisbane, Australia
Lines: 37
Approved: Ye shall know the truth, and the truth shall set ye free
Message-ID: sa7n786y3k.fsf@gweepery.stallion.oz.au
NNTP-Posting-Host: gweepery.stallion.oz.au
In-reply-to: set@oryx.llnl.gov's message of 25 May 1995 06:30:08 GMT
X-PGP-Info: send mail with "Subject: sendpgpkey" to obtain my PGP
public key
To: set@oryx.llnl.gov (Sam Trenholme)
X-Newsreader: (ding) Gnus v0.69
Status: RO

-----BEGIN PGP SIGNED MESSAGE-----

set@oryx.llnl.gov (Sam Trenholme) moved upon the face of the 'Net and
spake thusly:

> Ok guys, is there a way of doing this without using a temporary file:
>
> ls | awk 'BEGIN{FS="."}{print "mv "$0"
"$1".1"}' > l;chmod 700 l;l;rm l
>
> (The above made a list of files, foo.man, bar.man, etc. have the names
> foo.1, bar.1, etc)
>
Come on!

This is trivial:

for old in *man ; do new=`basename $old .man`.1 ; mv $old $new ; done

ObHack: Making up for SCO's lack of the renice() syscall by patching
the process table on the fly from user-land...

- --
| Christopher J.  Biggs | EMAIL: chris@stallion.oz.au (PGP and MIME OK)     |
| R&D Software Engineer	| ~~~~~  send "Subject: sendpgpkey"
for public key	|
| Stallion Technologies | PHONE: +61 7 270-4266  FAX: +61 7 371 8881	    |
| 56 Sylvan Rd, Toowong | RELIGION: emacs JOKE: Microsoft is not the Answer |
\ Qld, AUSTRALIA.  4066 | ....Microsoft is the Question.  NO is the answer! /


-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQCVAgUBL8uutJyEgW3JSqnhAQHcagQAm0q8p2GTnWS1iuSM3QmJ+I/iGTFs8vme
rerXLRug7a7G+UxJ13WgDh7UkEywnLPgGEXPkZ6Z5KCBmpzswqmoLq0r35larFRz
D9a2NiQyv2Sol3vBqMM1zt1w7977343xiFsZ9efaMu36JVfHXWLAmchxLg2SxDmz
cmO1dlFI83s=
=WLLa
-----END PGP SIGNATURE-----



Parent

Child

Back to index