The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 04-25-2008
penchal_boddu penchal_boddu is offline
Registered User
  
 

Join Date: Apr 2008
Location: Bangalore
Posts: 127
shorter form :

inputfile1=data/in/inputfile1.txt
inputfile2=data/in/inputfile2.txt

[ ! -f ${inputfile1} -a ! -f ${inputfile2} ] && { echo "\n ERROR: Both files not found. \n" ; exit 1 ;}

[ ! -f ${inputfile1} -o ! -f ${inputfile2} ] && { echo "\n ERROR: File(s) not found. \n" ; exit 1 ;}

echo "\n RUN SUCCESSFUL: Both Files found. \n"
exit 1