How can I remove CRLF line terminators from wget'ed file?
10,353
Use tr
to remove them:
wget http://pastebin.com/raw.php?i=LBVNiRXa -O- | tr -d '\r' >somefile
Related videos on Youtube
Author by
Tiago Carrondo
I've been using Ubuntu since BreezyBadger. Proud member of the Portuguese LoCoTeam.
Updated on September 18, 2022Comments
-
Tiago Carrondo over 1 year
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?
-
Fr0zenFyr over 7 yearsMillion Thanks!! My head was about to explode, wasted almost an hour on this trivial issue!