shell if say yes
#!/bin/bash
# ...
# in the middle of some long script
# obtain a response from the user
# ...
echo "Are you happy to proceed? [y,n]"
read input
# did we get an input value?
if [ "$input" == "" ]; then
echo "Nothing was entered by the user"
# was it a y or a yes?
elif [[ "$input" == "y" ]] || [[ "$input" == "yes" ]]; then
echo "Positive response: $input"
# treat anything else as a negative response
else
echo "negative response: $input"
fi
Also in C++:
- install toastr in angular
- vlc media player ubuntu
- install kubernetes plg
- git push with ssh output
- how to connect my ubuntu server to ssh
- start running reactjs from shell vscode
- brew install iterm2
- bash loop over files with extension
- git list all global aliases
- No module named 'seaborn'
- chrome installation on ubuntu
- linux show last modified time of file
- [email protected]: Permission denied (publickey)
- #fb0 in six digit olor code
- e package 'oracle-java8-installer' has no installation candidate ubuntu 16.04
- gitapply patch file
- install react hook form
- rpi install chomedriver
- clear history centos
- ArgumentError: Malformed version number string 0.32+git
- dependency problems - leaving unconfigured Errors were encountered while processing:
- how to install newrelic agent on aws linux
- install bootstrap in angular
- install libreoffice ubuntu 18.04