How does Bash determine true/false?
For example:
# is the given file a Perl script? if perl -ne 'exit 0 if /^#!.*perl\b/; exit 1' $1; then echo "yes, $1 is a Perl script" fi
details here