04-30-2008
16,
0
Join Date: Feb 2008
Last Activity: 29 July 2011, 3:47 AM EDT
Posts: 16
Thanks Given: 0
Thanked 0 Times in 0 Posts
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