TMPDIR before export :/var/tmp
cmd : /usr/atria/bin/cleartool setview -exec "export TMPDIR=/bldtmp/test/tmp;export UNPACKDIR=/var/tmp/unpackdir;echo After Export: $TMPDIR " test.view1
export: Command not found.
Exit 1
export: Command not found.
Exit 1
After Export: /var/tmp
If i am directly specifying the export command inside the shell script, it is working, but when i am trying it through "/usr/atria/bin/cleartool setview -exec "export TMPDIR=/bldtmp/test/tmp;export UNPACKDIR=/var/tmp/unpackdir;echo After Export: $TMPDIR " test.view1" it is not working.
my shell version is:
GNU bash, version 3.00.15(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
Let's lose all the surplus Shell syntax, remove, move, or correct many quote characaters, and just execute the command.
There is an issue with $TMPDIR because the value can only come from the login script. Let's assume that it has a value, otherwise every line mentioning $TMPDIR will fail.
I have no idea what is in /usr/atria/bin/cleartool but there is no possible way that a called process executed in this manner can change the environment of the calling process.
Assuming that /usr/atria/bin/cleartool is a Shell Script, it would need to execute in the current Shell environment if it was to change the current Shell environment.
There might be lots of newer versions released from that time but I remember, the said command was used to set the particular view (provided by view-tag, which is not present in your command).
i.e
cleartool set_view view_tag
You can also run your start-up files (containing the export command and other environment) with the -login option.
cleartool setview -login view-tag
In every case you have to provide the dynamic view-tag.
"cleartool setview -exec "cmds to execute" <dynamic view_name> ".
This command used to execute some commands within a view after setting the dynamic view. The above command will first set the view and then it will executes the commands provided.
So i tried to execute export command here, to override the default value, which is failing.
---------- Post updated at 10:43 AM ---------- Previous update was at 10:40 AM ----------