#!/bin/sh # # Convert a text file from ISO-8859-1 to UTF-8 # [ $# -eq 0 ] && { echo "usage: $(basename $0) file ..." >&2; exit 1; } for f in "$@"; do tmpfile=$(mktemp ~/.l2u.XXXXXX) || exit 1 iconv -f iso-8859-1 -t utf-8 "$f" >$tmpfile mv -f $tmpfile "$f" && chmod go+r "$f" done .