An example would be where a program needs to output something to a file, but first checks that the file exists:
#!/bin/sh
if test ! -s arg.file
then
echo "arg.file is empty or does not exist."
ls -l > arg.file
exit
else
echo "File arg.file already exists."
fi
exit 0
Note the exclamation mark within the test sequence.
The exclamation mark means ``not".