Skip to content

Instantly share code, notes, and snippets.

@egordorichev
Created August 25, 2020 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egordorichev/fd83e46dabbdd379a46120ca28567fa4 to your computer and use it in GitHub Desktop.
Save egordorichev/fd83e46dabbdd379a46120ca28567fa4 to your computer and use it in GitHub Desktop.
Dog: combines ls and cat for easy file checking
#!/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