How can I remove CRLF line terminators from wget'ed file?
I want to download a pastebin a raw file, and I tried:
wget http://pastebin.com/raw.php?i=LBVNiRXa -O somefile
My only problem is that the file arrives with CRLF line terminators.
Can I remove the line terminators with only one command line?
Solution 1:
Use tr
to remove them:
wget http://pastebin.com/raw.php?i=LBVNiRXa -O- | tr -d '\r' >somefile