Re: help with quoting/expansion in bash

2006-02-13 Thread Rick Pasotto
On Mon, Feb 13, 2006 at 11:45:14AM -0500, Daniel B. wrote: > Mike Bird wrote: > > >On Sun, 2006-02-12 at 11:23, David Berg wrote: > > > >>I'm trying to write a for loop that descends into a list of > >>directories and runs a command. I can't seem to get the quoting right > >>though. Most of the

Re: help with quoting/expansion in bash

2006-02-13 Thread David Kirchner
On 2/12/06, David Berg <[EMAIL PROTECTED]> wrote: > I'm trying to write a for loop that descends into a list ofdirectories and > runs a command. I can't seem to get the quoting rightthough. Most of the > directories have spaces and they are makingthings difficult for me. Here is > what I have

Re: help with quoting/expansion in bash

2006-02-13 Thread Daniel B.
Mike Bird wrote: On Sun, 2006-02-12 at 11:23, David Berg wrote: I'm trying to write a for loop that descends into a list of directories and runs a command. I can't seem to get the quoting right though. Most of the directories have spaces and they are making things difficult for me. Here is

Re: help with quoting/expansion in bash

2006-02-12 Thread David Berg
On 2/12/06, Kevin Mark <[EMAIL PROTECTED]> wrote: > Hi Dave, > the 'magic' is to never bother with escaped space!! Just use double > quotes! > > cd "$DIR" I'm thinking too hard again. I was trying to wrap it in {}. Is there a solution using braces as well? Thanks. --Dave

Re: help with quoting/expansion in bash

2006-02-12 Thread Mike Bird
On Sun, 2006-02-12 at 11:23, David Berg wrote: > I'm trying to write a for loop that descends into a list of > directories and runs a command. I can't seem to get the quoting right > though. Most of the directories have spaces and they are making > things difficult for me. Here is what I have: >

Re: help with quoting/expansion in bash

2006-02-12 Thread Kevin Mark
On Sun, Feb 12, 2006 at 01:23:47PM -0600, David Berg wrote: > I'm trying to write a for loop that descends into a list of > directories and runs a command. I can't seem to get the quoting right > though. Most of the directories have spaces and they are making > things difficult for me. Here is w

help with quoting/expansion in bash

2006-02-12 Thread David Berg
I'm trying to write a for loop that descends into a list of directories and runs a command. I can't seem to get the quoting right though. Most of the directories have spaces and they are making things difficult for me. Here is what I have: for DIR in dir\ 1 dir\ 2 dir\ 3; do cd $DIR