The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-30-2008
Nanu_Manju Nanu_Manju is offline
Registered User
 

Join Date: Feb 2008
Posts: 12
if test -f $file_exists

Hi,
I have a wiered problem probably unique to me.
if test -f "${LOGDIRE}/Component_Name.sql"
then
echo "<br>Synchronization success<br>"
else
echo "<br>Sorry! Synchronizing failed"
fi

Considering, the file is present always, the above condition returns different outputs in each execution. It is driving me nuts.

My suspision goes in this priority but I don't have reasons:
1) Syntax error in my code (KSH)
2) Influence of syntax error in other parts of the script (It is wiered that the above piece is before anything else in the script, it exits in case of error)
3) Load balanced cluster servers with two nodes. The $LOGDIRE is a space shared among several shared applications. It is a shared web hosting server
4) Influence of webserver environment - I use C executable, sqlplus, perl5, CGI and HPUX shell scripting and all are at different parts in the same shell script
5) I tried changing the save location, but doesn't seem to help
Reply With Quote
Forum Sponsor