View Single Post
  #3   (View Single Post)  
Old 18th July 2010
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 136
Default

Tried this, it was much faster, thanks. The mail is already saved to a temporary file, so this is easy.
Code:
#!/bin/sh

file $1 | grep 8859 > /dev/null
if [[ $? = 0 ]]; then
        iconv -f ISO-8859-1 -t UTF-8 < $1
else
        cat $1
fi
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote