#! /bin/sh fromenc="$1" shift toenc="$1" shift tmpfile="`python -c 'import tempfile; print tempfile.mktemp()'`" && for file in "$@"; do iconv -f "$fromenc" -t "$toenc" "$file" >"$tmpfile" && cp "$tmpfile" "$file" && rm "$tmpfile" done