0

I had developed the bash script as below. Aim of my script is to execute the command in dev user. After executing the script control passed to dev user but remaining command is not executed. Please some help on this issue.

#!/bin/bash
if [ "$USER" != "dev" ]; then
 su - dev
fi
echo Your are in $USER environment
#other commands
End of script 
Charles Duffy
  • 257,635
  • 38
  • 339
  • 400

0 Answers0