Want to execute the following commands from any single script. How to do this?
Whenever I'm starting my putty session, on my unix machine, bash shell is coming, then I need to enter the following commands to setup my workspace.
Below is the exact procedure which I'm doing.
-bash-4.2$ bash
[userName@SystemName ~]$ su
getting admin rights
[root@SystemName userName]#
setting up environment variable for python project
[root@SystemName userName]# source xxxx.env
setting the path for my local workspace
[root@SystemName userName]# setxxxx /home/userName/SourceCode/
Now, I want all these commands to get executed from single script. Thus, I had putted all these commands into a single shell script and tried to execute but only first instruction got executed. Why?
start.sh
#!/bin/bash
bash
su
source ssdt.env
setssdt /home/userName/projectName/