Hi all.
I'm still fairly new at this (shell scripting) so bear with me....
I currently have a script that tests to see if a $1 is a file :
Code:
if [[ -f $filename ]] then
do_stuff
else
echo "$filename is not a regular file"
fi
My question: is there a way to test that the file $filename is in ASCII and not another encoding type? I am using Korn shell.
Thanks for any help.
EDIT: I should note that $1 is assigned to filename before this code segment.