bug-bash
[Top][All Lists]
Advanced

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

Re: Forcing For Loop To Accept Spaces


From: Ian Macdonald
Subject: Re: Forcing For Loop To Accept Spaces
Date: Thu, 18 Apr 2002 11:25:41 -0700
User-agent: Mutt/1.3.28i

On Thu 18 Apr 2002 at 12:11:47 -0600, you wrote:

> Paul Jarc stated the following:
> > 
> > SoloCDM <address@hidden> wrote:
> > 
> > > How do I force a for loop to except files with spaces in their
> > > names?
> > 
> > Quote the spaces.  (BTW, you mean "accept", not "except". "except" is
> > nearly the opposite of what you mean.)
> 
> It didn't work.  Even with the quotes around the whole name it didn't
> work.

What are you using?

This works for me:

address@hidden ~]$ for i in 'foo bar'; do echo $i; done
foo bar

Ian
-- 
Ian Macdonald               | Every man is as God made him, ay, and often
address@hidden             | worse.   -- Miguel de Cervantes 
                            | 
                            | 
                            | 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]