I want to substitute a charactor "PAN" with "TAN" in a shell, I used sed command in shell, it wo'nt work but the same is run from command prompt it was successful. the command is
sed ' s/PAN/TAN/g ' <i/p> > <o/p>
sed ' s/^M/^M/g ' <i/p> > <o/p> (1st ^M is Ctrl+V+M, 2nd should be line feed/next line)
the same problem is with delete option in sed
Please suggest
---------- Post updated at 08:44 AM ---------- Previous update was at 08:27 AM ----------
actually file consist of single line with multiple ^M character, i am trying to convert all ^M character into line feed i.e new line (so that single line file become multiple line sequential file), the same works from comman line but not from shell program.