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

Re: Shell Scripting Question



On Sat, Oct 27, 2001 at 06:10:35PM -0400, Sunny Dubey wrote:
> my question is, how do I get it to print the list with each line as the 
> variable $fruit, as opposed to $fruit being each word.

Set the IFS variable to exclude spaces. (Normally it contains a space, a
tab, and a newline.) $IFS controls how word splitting is performed.

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



Reply to: