#!/bin/sh file $1 | grep 8859 > /dev/null if [[ $? = 0 ]]; then iconv -f ISO-8859-1 -t UTF-8 < $1 else cat $1 fi