Saturday, July 16, 2016

wget and line delimiters CR LF

If you download file with wget and the filename comes from windows file, the output filename will always have %0D at the end. To get rid of this, instead of:

wget $filename


wget $(echo "$filename" | tr -d '\r')

This will do the trick

No comments:

Post a Comment