superlint/test/linters/jscpd/good/shell_good_1.sh

18 lines
271 B
Bash
Raw Permalink Normal View History

2020-06-23 12:02:45 -04:00
#!/usr/bin/env bash
2020-02-04 09:49:58 -05:00
# CMD
HELLO_WORLD=$(echo "Hello World" | cut -f1 -d' ' 2>&1)
# Load the error code
ERROR_CODE=$?
# Check the shell
2020-07-21 13:09:07 -04:00
if [ ${ERROR_CODE} -ne 0 ]; then
2020-02-04 09:49:58 -05:00
echo "We did it!"
exit 0
else
echo "We done goofed it..."
2020-07-21 13:09:07 -04:00
echo "${HELLO_WORLD}"
2020-02-04 09:49:58 -05:00
exit 1
fi