superlint/.automation/test/shell/shell_good_1.sh

18 lines
259 B
Bash
Raw Normal View History

2020-02-04 09:49:58 -05:00
#!/bin/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
echo "We did it!"
exit 0
else
echo "We done goofed it..."
echo "$HELLO_WORLD"
exit 1
fi