Hi
1st problem
--------------
i have this sed command in my unix script which replaces new line and carriage return in a line with the string "
"
the script works fine in Linux 3.0.101-0.5, but not in AIX 1 7 , the "s/\r/\
/g"
replacement, replaces
all the character "r"
in the file.
sed "s/^M/\
/g;s/\r/\
\/g;s/\r^M/\
/g" < filename.txt > filename 2.txt
2nd problem
--------------
and then i have a awk command that works on the file filename2.txt (output of the above command), below is the awk command i'm using..
awk -v W="$1" '$0 ~ W{ORS="";if(NR!=1)print "\n";}1' filename2.txt > filename3.txt
instead of writing the sed output to a file can i send the output to the awk command, so that it doesn't have to take too much time writing and reading to two files.
any help is appreciated
Thanks
Mj
---------- Post updated 04-22-14 at 08:06 AM ---------- Previous update was 04-21-14 at 06:17 PM ----------
Hi All
Any response would be appreciated....
thanks
MJ