Skip to content

Instantly share code, notes, and snippets.

@sandygudie
Created October 5, 2021 22:21
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 sandygudie/919b7c825e213bb970010a566d5ef29b to your computer and use it in GitHub Desktop.
Save sandygudie/919b7c825e213bb970010a566d5ef29b to your computer and use it in GitHub Desktop.
Bash Scripting

Write a shell script that accepts a file or directory name as an argument. Have the script report if it is a regular file, a directory, or another type of file. If it is a directory, exit with a 1 exit status. If it is some other type of file, exit with a 2 exit status

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment