getting value of find command line

Posted:
in Mac Software edited January 2014
Hello everybody, I want to have the value of the batch command find.

I've written the following but it don't work. Perhaps I'm missign something.

if [ find /Applications/Autonome/test.log = 0 ] ; then

echo "file not found !"

fi

Thanks for your help.

Best regards

Comments

  • Reply 1 of 1
    Quote:
    Originally Posted by mourad View Post


    Hello everybody, I want to have the value of the batch command find.

    I've written the following but it don't work. Perhaps I'm missign something.

    if [ find /Applications/Autonome/test.log = 0 ] ; then

    echo "file not found !"

    fi

    Thanks for your help.

    Best regards



    in bash/sh you want



    if [ ! -e /Applications/Autonome/test.log ] ; then

    echo "file not found !"

    fi



    Check the CONDITIONAL EXPRESSIONS section of 'man bash' for the tests available. -e is 'file exists'
Sign In or Register to comment.