Skip to content

Instantly share code, notes, and snippets.

@reharik

reharik/input.sh Secret

Created October 28, 2020 14:40
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 reharik/9b5a9f3ec7fcf00483359345dbdafaa0 to your computer and use it in GitHub Desktop.
Save reharik/9b5a9f3ec7fcf00483359345dbdafaa0 to your computer and use it in GitHub Desktop.
#!/bin/bash
getopts n: flag
if [ -z "$OPTARG" ]; then
read -p "Please enter a number: " -r num
else
num=$OPTARG
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment