We can use test command in two ways as,
1. For using to combine two expression as,
/tmp/test, /tmp/ok files
test -f /tmp/test -a -f /tmp/ok
if [[ $? -eq 0 ]]
then
echo "Two files are available"
fi
2. For using to check the files availablity as,
[[ -a /tmp/ok ]] && echo "File is available"
-a is getting differed based on the test operation.
Thanks,
-Muthukumar.
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony