cancel
Showing results for 
Search instead for 
Did you mean: 

sed question

SOLVED
Go to solution
Sharvil Desai
Frequent Advisor

sed question

Hi!
I have a text file and I want to add the word "SUM(" in the begining of every line. Can you please tell me how to accomplish this?

when I try the following command,
sed 's/^/^SUM(/g' view.txt


I keep getting the following error,
sed: no remembered regular expressionThank you!
"help!"
2 REPLIES
benoit Bruckert
Honored Contributor
Solution

Re: sed question

Can you try this :
sed 's/^/SUM(/g' view.txt
TO see if it's better ??
It works for me...

regards
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Sharvil Desai
Frequent Advisor

Re: sed question

Actually, I too had tried that before and it didn't work. However, I think the problem is that I am using sed from WINNT through MKS toolkit. I tried that command on HP-UX and it worked fine....but thanx for confirming my doubt.
"help!"