With the file command I need to verify many files if they ASCII or other format
Sometimes I get from file command:
file1: ASCII English text
And sometimes I get different answer from file command
file2: Non-ISO extended-ASCII English text, with very long lines
I am really not sure if there are other answers with different syntax
My question is:
I write the follwing ksh syntax to verify if file is a ASCII but I not sure if the
following syntax is the optimal syntax in order to verify ASCII format?
[[ ` file $some_file | grep –c ASCII ` = 1 ]] && print "you have ascii file for sure"
If someone have other suggestion to verify ASCII format for sure!, I will very glad to see that