I have successfully made a bash script that needs root, permission, which I can run as root! But, the script only runs when I am using the terminal as root and if I type exit, it runs. When I type :
The terminal does nothing. Why is this so and is it normal? The code is
#!/bin/bash sudo su while true do sudo -k setleds -D +caps < /dev/console sleep 0.1 sudo -k setleds -D +caps < /dev/console sleep 0.1 sudo -k setleds -D -caps < /dev/console sleep 0.1 done
Do I need to remove the sudo commands?