Created
August 25, 2020 14:59
-
-
Save egordorichev/fd83e46dabbdd379a46120ca28567fa4 to your computer and use it in GitHub Desktop.
Dog: combines ls and cat for easy file checking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PASSED=$1 | |
if [ -d "${PASSED}" ] | |
then ls -l $PASSED; | |
elif [ -f "${PASSED}" ] | |
then cat $PASSED; | |
else echo "Confused barking sound"; | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment