4

[SOLVED] Understand a 'if' statement

view full story
linux-howto

http://www.linuxquestions.org – I have a script which never gets past these statements. Code: MYTEMPORARYTEMPFILE=/tmp/Log_File_Monitor_$$ ps -ef > $MYTEMPORARYTEMPFILE if [ "`grep "$(basename "$0")" $MYTEMPORARYTEMPFILE | grep -v $$ | grep -v sh -c`" != "" ] then  rm $MYTEMPORARYTEMPFILE  exit 2 fi rm $MYTEMPORARYTEMPFILE I do not understand this line fully. I know it checks for $MYTEMPORARYTEMPFILE but how does it exactly do it and what is 'basename'. Is it a reserved word as I do not see it defined in my script. Code: if [ "`grep "$(basename "$0& (HowTos)