I have a script
install.sh which contains commands to install packages on ubuntu. For ex:
#/bin/bash sudo apt-get update sudo apt-get updgrade sudo apt-get install <package>
Now there is a command which I want to run without sudo so I'll write without sudo
#/bin/bash sudo apt-get update sudo apt-get updgrade sudo apt-get install <package> pcmanfm --set-wallpaper /path to file <-- I want this to be run without sudo
But when I run the script, I do
sudo sh install.sh which automatically makes all the commands to be executed as sudo. Is there anyway, I can protect
pcmanfm command to not to run as sudo.