Skip to content

Instantly share code, notes, and snippets.

@uudashr
Last active March 1, 2017 04:48
Show Gist options
  • Save uudashr/c07db28cf6079b45e590534bc98fb5bb to your computer and use it in GitHub Desktop.
Save uudashr/c07db28cf6079b45e590534bc98fb5bb to your computer and use it in GitHub Desktop.
Prompt / ask something in shell script
#!/bin/sh
read -p "Install directory [/root]: " installDir; installDir=${installDir:-/root}; echo $installDir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment