1. `then' is missing
2. `print' should be `echo':
Code:
file=/etc/passwd
if [ ! -s $file ]; then
echo "$file is empty"
else
echo "$file has content"
fi
You can even use a one-liner:
Code:
file=/etc/passwd
[ -s $file ] && echo "$file has content" || echo "$file is empty"
Freddy Vulto
http://fvue.nl/wiki/Bash