run bash script linux with sudo password code example Example: run bash script linux with sudo password echo <password> | sudo -S <command>