Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
sed 's/^M//g'
sed 's/^M//g <input_file > output_file
tr -d '\n' < inputfile > outputfile # remove line feeds
tr -d '\t' < inputfile > outputfile # remove tabs
which shows that you can use the \n format.man sed said:Code:5. A sample sed script file: :join /\\$/{N s/\\\n// b join } This sed script joins each line that ends with a \ (backslash) to the line that follows it. First, the pattern /\\$/ selects a line that ends with a \ for the group of commands enclosed in {} (braces). The N subcommand then appends the next line, embedding a new-line character. The s/\\\n// deletes the \ and embedded new-line character. Finally, b join branches back to the label :join to check for a \ at the end of the newly joined line. Without the branch, the sed command writes the joined line and reads the next one before checking for a second \. Note: The N subcommand causes the sed command to stop immediately if there are no more lines of input (that is, if the N subcommand reads an end-of-file character). It does not copy the pattern space to standard output before stopping. This means that if the last line of the input ends with a \, it is not copied to the output.
{N
s/ / \
/g
}
b01301# cat hello.txt
Hello, world
b01301# sed 's/ / \
> /g' < hello.txt
Hello,
world