Mailing List Archive


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

Re: [tlug] Adding text to the beginning of a file



On Sat, Mar 17, 2007 at 09:06:40PM +0900, Stephen J. Turnbull wrote:
> 
> I don't know any way offhand to get file names with spaces to work
> under for.  I tried setting IFS to newline and using `ls` instead of
> *, but that seems to confuse bash completely in trying to parse the
> for statement.

This works for me:

export IFS=$'\n'
for file in `ls`;do echo $file; done

Ed


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links