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

Re: multiple words as single variable in bash?



On Thu, Jan 24, 2002 at 12:15:31AM -0100, andrej hocevar wrote:
> Of course, that was the first thing that came to mi mind, too. But
> it didn't work -- unfortunately I can't give you more details as it
> was a friend's script, yet I couldn't stop thinking about it.  

I can't really help unless you give more details, unfortunately. Am I
confused? Do you mean something different by "a single variable" than I
think you do?

> I thought maybe one could change the meaning of the spaces, e.g. by
> assigning something to IFS?

It's possible, but inadvisable.

> Even if it was a mistake -- is there no other way then quoting?

You can backslash-escape spaces as well, but that's just another way of
quoting.

> A quick look at some manuals gave me the impression that this problem
> might not be just a silly mistake of mine, can it?

I'm not quite sure what you mean there ...

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: