01-28-2012, 08:14 PM
Seems to work so far (thanks to bmenrigh & inv):
Code:
#!/bin/bash
if [ -z "$2" ]
then
echo "Usage: $0 <infile> <outfile>"
exit
fi
INFILE=$1
OUTFILE=$2
if [ -f "$INFILE" ] && `touch $OUTFILE`
then
iconv -f latin1 -t utf8 $INFILE > $OUTFILE
fi