Quote:
Originally Posted by questionsBot
supdate
Code:
#!/bin/bash
#supdate Script
apt update -y && apt upgrade -y
suninstall
Code:
#!/bin/bash
#echo "Nice to meet you $1"
if test -z "$1"
then
echo "\You forgot to add a filename to uninstall"
else
apt --purge remove $1 -y
apt autoremove -y
apt clean
fi
|
alias supdate='sudo apt update -y && sudo apt upgrade -y' in .bashrc or .bash_aliases requires neither root permission to place them or edit them. any other user on your system would more than likely be able update, upgrade, purge or autoremove with their own sudo access.
i like that use of test. nice addition. i just read the other day that functions are also an option in .bashrc so sunintstall would probably work too. i just have never used one.