Re: bash and variable holding directories with spaces

2005-12-07 Thread Andrew Cady
On Wed, Dec 07, 2005 at 01:18:12AM +0100, Almut Behrens wrote: > On Tue, Dec 06, 2005 at 04:07:02PM -0500, Andrew Cady wrote: > > Seriously though, shell scripting sucks. Perl! It's on every > > debian system with debconf. > > I absolutely agree with you here. I love perl myself. OTOH, I'm > t

Re: bash and variable holding directories with spaces

2005-12-06 Thread Almut Behrens
On Tue, Dec 06, 2005 at 04:07:02PM -0500, Andrew Cady wrote: > On Sun, Dec 04, 2005 at 12:11:22AM +0100, Almut Behrens wrote: > > On Sat, Dec 03, 2005 at 05:58:28PM -0500, H.S. wrote: > > > > > $ DIRS="'file\ 1 file\ 2'"; ls -ln "$DIRS" > > > ls: 'file\ 1 file\ 2': No such file or directory > > >

Re: bash and variable holding directories with spaces

2005-12-06 Thread Andrew Cady
On Sun, Dec 04, 2005 at 12:11:22AM +0100, Almut Behrens wrote: > On Sat, Dec 03, 2005 at 05:58:28PM -0500, H.S. wrote: > > > $ DIRS="'file\ 1 file\ 2'"; ls -ln "$DIRS" > > ls: 'file\ 1 file\ 2': No such file or directory > > in this case you probably want > > $ DIRS='file\ 1 file\ 2'; eval ls -l

Re: bash and variable holding directories with spaces

2005-12-03 Thread H.S.
Almut Behrens wrote: > On Sat, Dec 03, 2005 at 05:58:28PM -0500, H.S. wrote: > >>Michael Marsh wrote: >> >>>If I understand the behavior you want correctly, then >>>DIRS="'/cygdrive/c/Documents\ and\ Settings /cygdrive/d/My\ Data'" >>>works for me. >>> >>>This also works for constructions like >>>

Re: bash and variable holding directories with spaces

2005-12-03 Thread Almut Behrens
On Sat, Dec 03, 2005 at 05:58:28PM -0500, H.S. wrote: > Michael Marsh wrote: > > If I understand the behavior you want correctly, then > > DIRS="'/cygdrive/c/Documents\ and\ Settings /cygdrive/d/My\ Data'" > > works for me. > > > > This also works for constructions like > > DIRS="'$dir1 $dir2'" >

Re: bash and variable holding directories with spaces

2005-12-03 Thread H.S.
Michael Marsh wrote: > If I understand the behavior you want correctly, then > DIRS="'/cygdrive/c/Documents\ and\ Settings /cygdrive/d/My\ Data'" > works for me. > > This also works for constructions like > DIRS="'$dir1 $dir2'" Okay, but this doesn't work: $> ls -nl file* -rw--- 1 1000 1000

Re: bash and variable holding directories with spaces

2005-12-03 Thread Michael Marsh
On 12/3/05, H.S. <[EMAIL PROTECTED]> wrote: > In the script, I am faced with this problem of defining the source > directories (dirs on the remote machine to be backed up) in a bash > variable. I want to define a variable DIRS so that it expands to: > '/cygdrive/c/Documents\ and\ Settings /cygdrive