How can I replace each newline (\n) with a space using sed?
How can I replace a newline (“\n“) with a space (““) using the sed command? I unsuccessfully tried: sed ‘s#\n# #g’ file sed ‘s#^$# #g’ file How do I fix it? 4 43
How can I replace a newline (“\n“) with a space (““) using the sed command? I unsuccessfully tried: sed ‘s#\n# #g’ file sed ‘s#^$# #g’ file How do I fix it? 4 43
How would I use sed to delete all lines in a text file that contain a specific string? 20 20 To remove the line and print the output to standard out: sed ‘/pattern to match/d’ ./infile To directly modify the file – does not work with BSD sed: sed -i ‘/pattern to match/d’ ./infile Same, … Read more