superlint/.automation/test/shell_shfmt/shell-shfmt_bad_1.sh

18 lines
281 B
Bash
Raw Normal View History

2020-08-28 14:42:32 -04:00
#!/usr/bin/env bash
# CMD
HELLO_WORLD=$(echo "Hello World" | cut -f1 -d' ' 2>&1)
# Load the error code
ERROR_CODE=$?
# Check the shell
if [ ${ERROR_CODE} -ne 0 ]; then
2020-11-06 17:10:09 -05:00
echo "We did it!"
exit 0
2020-08-28 14:42:32 -04:00
else
2020-11-06 17:10:09 -05:00
echo "We done goofed it..."
echo "${HELLO_WORLD}"
exit 1
2020-08-28 14:42:32 -04:00
fi