[ale] Newb question
Geoffrey
esoteric at 3times25.net
Wed Jan 23 18:49:58 EST 2002
Actually, it works either way. with the {} you don't need the quotes
around .bak
Chris Fowler wrote:
> #!/bin/sh
> for stuff in * do
> mv $stuff ${stuff}".bak"
> done
> -----Original Message-----
> From: Thompson Freeman [mailto:tfreeman at intel.digichem.net]
> Sent: Wednesday, January 23, 2002 4:42 PM
> To: Ty Connell
> Cc: 'ale at ale.org'
> Subject: Re: [ale] Newb question
>
>
>
>
> I'm likely to have a typo or three, but along the lines of:
>
> #!/bin/sh
> for stuff in * do
> mv $stuff $stuff".bak"
> done
>
> I don't do nearly enough shell work, but that is approximately correct I
> think. And I'm sure somebody will fix my errors loudly!
>
>
> On Wed, 23 Jan 2002, Ty Connell wrote:
>
>
>>I would like to rename all the files in a directory from <file> to
>><file>.bak. I know there is an easy way to do it, but I don't know it -
>>
> any
>
>>help?
>>
>>My hacky solution was to use this:
>>perl -pi.bak -e '//'
>>which gives me backups of all the files. Then I just blow away the real
>>ones I don't want to use.
>>
>>There must be a more elegant solution that my simple mind just does not
>>know.
>>
>>-ty
>>
>>---
>>This message has been sent through the ALE general discussion list.
>>See http://www.ale.org/mailing-lists.shtml for more info. Problems should
>>
> be
>
>>sent to listmaster at ale dot org.
>>
>>
>>
>
> --
> ===========================================
> The harder I work, the luckier I get.
> Lee Iacocca
> ===========================================
> Thompson Freeman tfreeman at intel.digichem.net
>
>
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
> sent to listmaster at ale dot org.
>
>
>
>
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
> sent to listmaster at ale dot org.
>
>
>
--
Until later: Geoffrey esoteric at 3times25.net
"...the system (Microsoft passport) carries significant risks to users that
are not made adequately clear in the technical documentation available."
- David P. Kormann and Aviel D. Rubin, AT&T Labs - Research
- http://www.avirubin.com/passport.html
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list