#/bin/sh -e

TMP="$(mktemp)"
# Run bowtie2 without any arguments and save stderr in a temporary file:
STDOUT="$(bowtie2 2> ${TMP})"
# Exit status of the previous command should be 1
[ "$?" -eq 1 ]
# Save help message into a variable:
HELP_MESSAGE="$(bowtie2 --help)"
# Check if stderr contains help message:
grep -q "${HELP_MESSAGE}" "${TMP}"
echo "SUCCESS: help message was detected!"
rm "${TMP}"
