I need to delete a newline with exact character at the beginning of the line.
For example, I have new.txt file which contains the following lines:
"AAA"AAA
"BBB
"""BBB
"CCC"CCC
Expected result is:
"AAA"AAA
"BBB"BBB
"CCC"CCC
I tried using sed
but it is not working.
sed -i -e 's/\n"""/"/g' new.txt
Please help me to solve this.
With Perl.
perl -i -0777pe 's/\n"""/"/' new.txt
Output to new.txt
:
"AAA"AAA "BBB"BBB "CCC"CCC