Skip to content

Instantly share code, notes, and snippets.

@pasha-pivo
pasha-pivo / convert.sh
Last active April 26, 2018 07:25 — forked from akost/convert.sh
Bash script for recursive file convertion windows-1251 --> utf-8
#!/bin/bash
# Recursive file convertion windows-1251 --> utf-8
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command
find ./ -name "*.txt" -o -name "*.html" -type f |
while read file
do
echo " $file"
mv "$file" "$file".icv