[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: for i in *



On Sun, May 20, 2001 at 06:13:07PM +0200, Philipp Lehman wrote:
> On Sun, 20 May 2001, Philipp Lehman <lehman@gmx.net> wrote:
> 
> >On Sun, 20 May 2001, Hans <hansfong@zonnet.nl> wrote:
> >
> >>I still don't understand the proper syntax for this: I want to process
> >>multiple files, e.g. symlinking a bunch or converting graphics.
> >>
> >>for i in *;do 'ln -s $i /home/newdir/$i';done
> >              ^^^                      ^^^
> >
> >You need grave accents here.
> 
> Ouch! You don't need _any_ quotes in this case, sorry. What I was
> trying to say was that you shouldn't confuse accents and single quotes
> as they have different meanings in bash.
> 

I have found it useful and more readable to use the $(command) syntax
in place of `command`. It has the additional advantage of being
nestable, though that is rarely needed.

-- Mark



Reply to: