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: Sun, 25 Mar 2007 17:37:44 +0900 (JST)
- From: Curt Sampson <cjs@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> <20070317132851.GA77091@example.com> <20070317153015.GO13829@example.com> <20070317161228.GP13829@example.com> <17916.8119.382436.102737@example.com>
On Sun, 18 Mar 2007, Stephen J. Turnbull wrote:
No, it's only going to seem to work for echo. Try
touch abc def "ghi jkl" export IFS="" for file in `ls`; do ls $file; done
It would probably work fine if you quoted the variable. In pdksh:
$ touch a b 'c d' "e\nf" $ for i in *; do ls -l "$i"; done -rw-rw-r-- 1 cjs wheel 0 Mar 25 17:33 a -rw-rw-r-- 1 cjs wheel 0 Mar 25 17:33 b -rw-rw-r-- 1 cjs wheel 0 Mar 25 17:33 c d -rw-rw-r-- 1 cjs wheel 0 Mar 25 17:33 e\nf
Note that the \n is a real newline:
$ echo e* e f
cjs -- Curt Sampson <cjs@example.com> +81 90 7737 2974
- 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
- Re: [tlug] Adding text to the beginning of a file
- From: Scott Robbins
- Re: [tlug] Adding text to the beginning of a file
- From: Edward Wright
- Re: [tlug] Adding text to the beginning of a file
- From: Edward Wright
- Re: [tlug] Adding text to the beginning of a file
- From: Stephen J. Turnbull
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Non destructive update of MySQL database
- Next by Date: Re: [tlug] A Distro Question
- 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