File Name needs to display

view full story

http://www.unix.com – I am new to shell scripting plz help me to get solution for below requirement – If name.sh file is present, message will be displayed as “name.sh is present” else "name.sh is not present" I have tested below script but getting error. Code: #!/bin/ksh file_found=`ls name.sh` found=`echo $?` if $found -eq 0 then echo "$file_found is present" else echo "name.sh is not present" fi Error – Code: bash-2.05$ ./filename.sh ./filename.sh[4]: 0: cannot execute name.sh is not present bash-2.05$ Thankx, Rahul (HowTos)