Re: Regular expression quiz


Subject: Re: Regular expression quiz
From: James Gibson (twistedhammer@subdimension.com)
Date: Sat May 04 2002 - 04:50:42 AKDT


On Fri, 3 May 2002, James Zuelow wrote:

>
>
> ----- Original Message -----
> From: "Leif Sawyer" <lsawyer@gci.com>
> To: "Mike Barsalou" <mbarsalou@aidea.org>; <aklug@aklug.org>
> Sent: Friday, May 03, 2002 4:18 PM
> Subject: RE: Regular expression quiz
>
>
> >
> > Mike Barsalou ponders...
> > > What regular expression do I use?
> > >
> >
> You don't need a regexp if I understand the contents of myfile correctly.
>
> mv `awk '{ print $0 }' ORS=" " myfile` newdir/
>

why even go to that much trouble if the filenames are all in the file:

   mv `cat myfile` newdir/

   mv: we all know what this one does
   `cat myfile`: the command between the backticks ("`") is run, and is
replaced by the output of the command with all newlines replaced by spaces
(I believe.. it works like that anyway) ; in this case the output of the
cat command is the contents of the file.

James Gibson

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Fri May 03 2002 - 17:05:49 AKDT