I have some files with Windows line endings and latin-1 encoding that I need to convert to unix line endings and utf-8.
Of course I can
for file in ./*.csv; do
sed s'/^M//' "$file" > "${file}.bak"
iconv -f iso-8859-1 -t utf8 "${file}.bak" > "$file"
rm "${file}.bak"
done
But is there a commonly available tool that can do both of these things at once? Maybe this isn't the most efficient way. (Maybe iconv?)