Running C Executable With Arguments As C Executable From Shell Script

I have written a shell script to run c executable with arguments.

 export PATH
 Resour >> $LOGDIR/log.Resour        //Resour is an exe
 SetLogLevel 6                       //SetLogLevel is an exe
 ExecCommand ProcessRealTime 1 1 ProcessRealTime >>$LOGDIR/log.ProcessRealTime  2>&1&`

However on running the above script , Resour and SetLogLevel exe are running properly but ExecCommand Exe which is used to start ProcessRealTime and make its entry in a shared memory shows "execv: No such file or directory".

All my executable are under the path $HOME/Application/Exec/Run which has been exported. But when I did the following changes , the script worked:

ExecCommand $HOME/Application/Exec/RunProcessRealTime 1 1 ProcessRealTime >>$LOGDIR/log.ProcessRealTime 2>&1&

Can someone help me in running the script without adding the paths and running the commands directly using just export statements.


The PATH environment variable affects the shell only. You have to implement your own path lookup if you use execv or move to execvp that does search the directories mentioned in the PATH


 ? UNIX Shell scripting/Menu
 ? Find and replace: \'
 ? Find and replace: \'
 ? Find and replace: \'
 ? replace with sed on Mac OS X Leopard doesn't do what expected
 ? Change find and replace every iteration
 ? Using sed to replace text with spaces with a defined variable with slashs
 ? Grep - find and replace
 ? sed command - find and replace while excluding specific pattern in find
 ? Fixed width file String replacement