I cannot find a suitable sed expression to remove the word followed by the string return (\ n)
Test file:
line1\n line2\n line3mark\n line4\n line5\n
and I want to delete all label entries \ n, in this case:
line1\n line2\n line3line4\n line5\n
searched and can use:
sed 's/\n//g' test.file to remove ALL \n's
but
sed 's/mark\n//g' test.file does not work
Strange, s / mark \ n // g seems to work fine in vi interactively.
Any help is much appreciated! I would like to understand how to do this using SED, if possible, as I am sure it is possible! However, if this can be done in a different way, I am also happy as long as it is on the command line, since it has to run many files.
Many thanks.
user1048271
source share