Can any one explain the below Unix commands for the DataStage Jobs ??
. /export/dsadm/sdgw/.profile
dshome=`cat /.dshome`
export PATH=$PATH:$dshome/bin
HOME=/export/dsadm/sdgw/
export PATH=$PATH:$HOME
Can any one explain the below Unix command ??
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 12
- Joined: Wed Oct 07, 2015 4:14 am
- Location: BANGALORE
. /export/dsadm/sdgw/.profile
The "period space filename" is saying "execute the following file and activate any changes it makes to environment variables in the current session." This is usually called "sourcing" a profile because the source command can be used instead of the "period". That file probably contains some environment variable settings that are commonly used (or required).
dshome=`cat /.dshome`
The hidden file ".dshome" is located at the root of any server that contains a valid DataStage engine. Its contents are the path to the DataStage engine location on that server (usually something like /opt/IBM/InformationServer/Server/DSEngine). The back quotes are special, and mean "execute the command inside and place what it returns here". So it sets the temporary environment variable dshome to the path to the DataStage engine.
export PATH=$PATH:$dshome/bin
The /bin sub-directory underneath DSEngine contains commands some developers like to use in scripts. This puts the full path in the PATH variable so that the commands are available no matter where you are located .
HOME=/export/dsadm/sdgw/
export PATH=$PATH:$HOME
It looks like someone stores some common commands in /export/dsadm/sdgw/ and also wants those in the PATH variable so they are executable no matter which where you are currently located.
The "period space filename" is saying "execute the following file and activate any changes it makes to environment variables in the current session." This is usually called "sourcing" a profile because the source command can be used instead of the "period". That file probably contains some environment variable settings that are commonly used (or required).
dshome=`cat /.dshome`
The hidden file ".dshome" is located at the root of any server that contains a valid DataStage engine. Its contents are the path to the DataStage engine location on that server (usually something like /opt/IBM/InformationServer/Server/DSEngine). The back quotes are special, and mean "execute the command inside and place what it returns here". So it sets the temporary environment variable dshome to the path to the DataStage engine.
export PATH=$PATH:$dshome/bin
The /bin sub-directory underneath DSEngine contains commands some developers like to use in scripts. This puts the full path in the PATH variable so that the commands are available no matter where you are located .
HOME=/export/dsadm/sdgw/
export PATH=$PATH:$HOME
It looks like someone stores some common commands in /export/dsadm/sdgw/ and also wants those in the PATH variable so they are executable no matter which where you are currently located.