if [ `whoami` != root ]; then
echo Please run this script as root or using sudo
# update code goes here
# cleaning code goes here
while true; do
echo "Choose your option. Type the number of your selection."
echo " 1. Update my programs."
echo " 2. Clean up my Linux Mint installation."
echo " 0. Exit"
case $ans in
some_command > /dev/null 2>&1
wei2912 wrote:Thanks. Updated the script, however i could not make the script run as root as if i did so, the user will be recognized as root. Also, the command you gave me did not work for me - the apt-get output still appeared.
Quiet; produces output suitable for logging, omitting progress
indicators. More q's will produce more quiet up to a maximum of 2.
You can also use -q=# to set the quiet level, overriding the
configuration file. Note that quiet level 2 implies -y, you should
never use -qq without a no-action modifier such as -d, --print-uris
or -s as APT may decided to do something you did not expect.
case $response in
Users browsing this forum: No registered users and 7 guests