Skip to content

Instantly share code, notes, and snippets.

@nicoxxxcox
Last active March 21, 2021 20:05
Show Gist options
  • Save nicoxxxcox/99108999990c4d76bf6649ee4e71c425 to your computer and use it in GitHub Desktop.
Save nicoxxxcox/99108999990c4d76bf6649ee4e71c425 to your computer and use it in GitHub Desktop.
Encode ISO-8859 to ASCII shell script
#!/bin/bash
FROM=iso-8859-1
TO=ASCII//IGNORE
ICONV="iconv -f $FROM -t $TO"
# Convert
find -P ./ -type f -name "*.scss" | while read fn; do
cp ${fn} ${fn}.bak
$ICONV < ${fn}.bak > ${fn}
rm ${fn}.bak
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment