I would like to write a bash script to perform some tasks under root while logging as normal user. Is it possible to have something like this?
#!/usr/bash sudo -i <multiple line perform all my sudo command> ... ... ... exit <back to my user command, continue some other task>
Of course I can put a sudo every line, but I would like to find out is it possible to do something like above? Thanks.