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: 7893 of alt.hackers
From: paul@frcs.alt.za (Paul Nash)
Newsgroups: alt.hackers
Subject: Re: A challenge for UNIX wizards
Date: 27 May 1995 21:43:25 +1000
Organization: Free Range Computer Systems CC
Lines: 17
Approved: feh!
Message-ID: 3q738t$27o@tantrum.frcs.alt.za
NNTP-Posting-Host: 150.203.148.149
Status: RO

cmcurtin@clipper.cb.att.com (C Matthew Curtin) writes:

> for x in `ls *.man`
> do
> mv $x `ls $x | sed s/\.man/\.1/g`
> done

mv $x `echo $x | sed -e 's/\.man$/\.1/'`

Otherwise you'll change "man.man.man" to "man.1.1",
which is not
quite what was intended.  One (of many) alternatives is:

mv $x `basename $x .man`.1
--
   Paul Nash <paul@frcs.alt.za>       turbo-nerd & all-round nice guy
       14/114 Blamey Cres, Campbell, Canberra ACT 2601, AUSTRALIA
        finger <pauln@mickey.iafrica.com> for PGP 2.6 public key



Parent Parent

Back to index