Better way of reading in a filename:
The command to call the shell should be:
shellname inputfilename
in other words, have the user list the filename right after the shell script call. If your shell is called command.ksh, then have the user do this:
command.ksh filename_to_read_in
Inside the script, use the variable $1 to capture the filename, i.e.
inputfile=$1
Now, you have the input file in your shell var.
You can use
if ( -e $1 ); then
do something
else
create error msg
fi
Do a "man test" to see the -e definition.