title: How to execute shell script via sudo user
body: <p>Can someone give an example of running shellscript via sudo user?</p>
  
  <p>I tried like this.</p>
  
  <p>sudo /usr/local/sbin/deploy | ./tmp/cp1.sh</p>
  
  <p>The above script is executed as a normal user not as the sudo user.</p>