To get the password, just put sudo echo "Thanks."
at the start of the script.
But I would prefer this solution:
if [[ $UID != 0 ]]; then
echo "Please run this script with sudo:"
echo "sudo $0 $*"
exit 1
fi
To get the password, just put sudo echo "Thanks."
at the start of the script.
But I would prefer this solution:
if [[ $UID != 0 ]]; then
echo "Please run this script with sudo:"
echo "sudo $0 $*"
exit 1
fi