First off I usually script in the bash shell.
Ok, in my script I am checking to see if the filename has a .txt extension.
So I was trying:
if [ ! -e "*txt" ] then echo "Must contain a valid .txt extension" fi
if [ "-f" -eq *[txt] ] then echo "Must contain a valid .txt extension" fi
But no go the first example sort of works but it always echo out the statement.
added code tags for readability --oombera