SUMMARY: SED question

From: Bruce Purcell (bpurcell-subscriptions@mailblocks.com)
Date: Wed Feb 18 2004 - 16:30:30 EST


So, I had a lot of answers -- over 40 and still coming, so it would too long
to credit each person. Thanks to all. Most recommended using tr, there was
one nice perl solution, a couple of awk answers. And, a couple using cat.
Here is the one where I've based what I've done. I went this way just
because the files are small and this is quick:

Bruce, If you only have 3 to 4 line files then let the
shell do it for you:

$ cat > foobar
line 1
line 2
line 3
line 4
^D
$ myvar=`cat foobar`
$ echo $myvar > foobar.new
line 1 line 2 line 3 line 4

Bruce Purcell
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:28:05 EDT