Bash shell script error
I am new to linux bash shell scripting.
I am trying to execute the following script on my linux box, but getting error.
Can anyone please help me to get out of it....?
Functionality : I have one search tool CCSearchX, whenever I execute the toll it generates some files. So here here first I am checking whether the same process is in execution or not, if yes then do nothing and if no then check whether any previous result file is available or not. if result file is available then do nothing and if result file is not available execute the CCSearchX utility.
following is the shell script
pgrep -f "CCSearchX"
if [ $status != 0 -a $status != 1 -a $status != "" ];
echo "Process is running"
if [ "$(find -name 'linux_result_cc_search_*')" != "" ];
echo "Output file linux_result_cc_search_* exist."
./CCSearchX --input=/ --output=/tmp/linux_result_cc_search_1287659590.txt
And I am getting following error
bash_cc_search_1287659890.sh: line 16: syntax error: unexpected end of file
I suppose it fails because of wrong usage of nested if-else-if. Try this Nested if/then Condition Tests :)