Text formating

Alexander Dalloz alexander.dalloz at uni-bielefeld.de
Mon Apr 26 15:41:37 UTC 2004


Am Mo, den 26.04.2004 schrieb Alexander Dalloz um 16:56:

> sed -e 's/\\n//g' < textfile > textfile.new

Sorry, that was a non proper quick shot. Maybe following is a bit
exacter what you want:

$ cat testfile
Mary had a\n
little\n
lamb, it's fleece was white\n
as snow.\n
A quick brown fox\n
jumps over the\n
lazy dog.\n

$ cat testfile | tr -d '\n' | sed -e 's/\.\\n/\.\n/g' | sed -e 's/\\n/
/g'
Mary had a little lamb, it's fleece was white as snow.
A quick brown fox jumps over the lazy dog.

I am just unsure whether you really have \n plus line break in your
source file. 

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 1 (Yarrow) on Athlon CPU kernel 2.4.22-1.2179.nptl
Sirendipity 17:34:09 up 8 days, 19 users, load average: 0.16, 0.07, 
                   [ Γνωθι σ'αυτον - gnothi seauton ]
             my life is a planetarium - and you are the stars
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040426/b5a1936e/attachment-0001.sig>


More information about the fedora-list mailing list