simple code i tried from my bash script
#!/usr/bin/bash
whoami
sudo -i
whoami # this is not working, but my prompt changes to root
any help, starting with bash just now, actually i am trying to execute some sed commands through bash, but commands were not executing. If this is solved hope i could work on the remaining
#!/usr/bin/bash
sudo -i
sed -i '1 a some text' filename
same sed command works fine with command prompt but none is working, i amnot sure where i am making mistakes