Remove Line Breaks with tr

I had a text file with multiple lines of input that I was manipulating using awk and sed but I found the following ‘tr’ command easiest to remove the line breaks:

cat input.txt | tr -d ‘\n’

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>