Mailing List Archive
tlug.jp Mailing List tlug archive tlug 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
- Date: Sat, 17 Mar 2007 09:28:51 -0400
- From: Scott Robbins <scottro@example.com>
- Subject: Re: [tlug] Adding text to the beginning of a file
- References: <45FA6B45.3040500@example.com> <ba75897e0703160413oc5219d7gb2bea3d53cd0afc2@example.com> <45FB452B.8050205@example.com> <ba75897e0703162026gb5fec8cm94470f4e30b117c4@example.com> <17915.55760.452640.548230@example.com> <20070317122958.GM13829@example.com>
- User-agent: mutt-ng/devel-r804 (FreeBSD)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, Mar 17, 2007 at 09:29:58PM +0900, Edward Wright wrote: > 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 I didn't know that one. I do find that setting it null also works export IFS="" With yours, I found that mistyping, and leaving out the $ set n as the separator. touch 1 2 3 "stupid file name" export IFS='\n' [note the typo] for i in `ls`; do echo $i; done 1 2 3 stupid file ame :) - -- Scott Robbins PGP keyID EB3467D6 ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 ) gpg --keyserver pgp.mit.edu --recv-keys EB3467D6 Willow: According to Freddy's latest editorial, 'The pep rally is a place for pseudo-prostitutes to provoke men into a sexual frenzy, which, when thwarted, results in pointless athletic competition.' Xander: And the down-side being? -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFF++0T+lTVdes0Z9YRAoxXAJ9b+SPCrIkO1k7r+c6V4CGUXs7RuwCgwQIp FoLn4erkeRIKpDKZZL7gvZI= =gzgB -----END PGP SIGNATURE-----
- Follow-Ups:
- Re: [tlug] Adding text to the beginning of a file
- From: Edward Wright
- References:
- [tlug] Adding text to the beginning of a file
- From: Dave M G
- Re: [tlug] Adding text to the beginning of a file
- From: Arwyn Hainsworth
- Re: [tlug] Adding text to the beginning of a file
- From: Dave M G
- Re: [tlug] Adding text to the beginning of a file
- From: Arwyn Hainsworth
- Re: [tlug] Adding text to the beginning of a file
- From: Stephen J. Turnbull
- Re: [tlug] Adding text to the beginning of a file
- From: Edward Wright
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Adding text to the beginning of a file
- Next by Date: [tlug] get free local port for script?
- Previous by thread: Re: [tlug] Adding text to the beginning of a file
- Next by thread: Re: [tlug] Adding text to the beginning of a file
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links