Hi, I'm using Bourne shell and i want to check multiple condition in an if statement using 'OR'. I need to check 2 directories for a particular file. If not found I've to do send mail.
if [ ! -f [ /home/dir_1/$filename -o /home/dir_2/$filename ] ]
then
mail xyz
fi
It didnt give any syntax error but didnt work as desired. Can anyone pls let me know the correct syntax.
Thanks
if [ ! -f [ /home/dir_1/$filename -o /home/dir_2/$filename ] ]
then
mail xyz
fi
It didnt give any syntax error but didnt work as desired. Can anyone pls let me know the correct syntax.
Thanks