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, 17 Mar 2007 21:06:40 +0900, "Stephen J. Turnbull"
<stephen@example.com> wrote:

> I don't know any way offhand to get file names with spaces to work
> under for.

This works for me (using bash):

$ \ls -1 | while read f; do echo "$f"; done

The backslash before 'ls' is to avoid using the alias, which is defined
as: alias ls='/bin/ls $LS_OPTIONS'
$ echo $LS_OPTIONS
-F -b -T 0 --color=auto

--
G. Stewart - godwin.stewart@example.com

If at first you don't succeed, redefine success.

Attachment: pgpMqQnM52as1.pgp
Description: PGP signature


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links