Execute a shell script in current shell with sudo permission

view full story

http://stackoverflow.com – For executing a shell script in current shell, we need to use a period . or a source command. But why does it not work with a sudo permission? I have a script with execute permission called setup.sh. When I use a period, I get this: $ sudo . ./setup.sh sudo: .: command not found The source command also produces a similar error. Am I missing out something? What should I do to run the script with sudo permission in the same shell? Thanks in advance.. (HowTos)