alexgor
asked on
Regular Expression (sed editor)
Hello !
I have following file, called for example "a.txt"
f_a
m_b
Now I want to replace each first character at a line followed by "_", by the same character followed by "@",
in other words I wish to receive following file.
f@a
m@b
It's important for me to execute the upper task using sed editor, and I do it in the following way:
>> sed s/"^(.)_"/"\0@"/ a.txt > b.txt
But for any reason this command doesn't work.
Can you please explain what is a problem.
Txs,
Alex
I have following file, called for example "a.txt"
f_a
m_b
Now I want to replace each first character at a line followed by "_", by the same character followed by "@",
in other words I wish to receive following file.
f@a
m@b
It's important for me to execute the upper task using sed editor, and I do it in the following way:
>> sed s/"^(.)_"/"\0@"/ a.txt > b.txt
But for any reason this command doesn't work.
Can you please explain what is a problem.
Txs,
Alex
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER