linux:bash_check_if_root
#!/bin/bash if [[ $(id -u) -ne 0 ]]; then printf "\nMust be root or use sudo\n\n"; exit; fi
linux/bash_check_if_root.txt · Last modified: 12/01/2024 15:00 by Allan
#!/bin/bash if [[ $(id -u) -ne 0 ]]; then printf "\nMust be root or use sudo\n\n"; exit; fi