When i am trying to execute export command within a shell script it is saying command not found.
I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found"
My code is as follows:
--------------------------
output coming :
---------------
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:
Please help me on this.
Thanks
Last edited by Franklin52; 06-15-2012 at 04:36 AM..
Reason: Please use code tags for data and code samples
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.
Perhaps:
i.e dot-space-dot-slash-scriptname
Last edited by methyl; 06-16-2012 at 10:14 PM..
Reason: typos and addenda
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
You can also run your start-up files (containing the export command and other environment) with the -login option.
In every case you have to provide the dynamic view-tag.
i used:
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 ----------
@methyl
is clearcase command used inside a clearcase view to execute the cmds within a view after setting it.
/usr/atria/bin/cleartool is the path of the clearcase installed in the system.
thanks
Last edited by methyl; 06-22-2012 at 08:39 PM..
Reason: Highlight code with code tags. Not sure about the quotes in this context.
friends,
i have application commands to execute in shell script it is something like this. i will login with user data it takes me to $ prompt. Example given below
login: data
ps : xxxx
$ MNSinput --this takes me to greater than prompt >
> ops --this is command i enter this output... (7 Replies)
Hello,
I need to execute below command in shell script
srvctl relocate service -d $database -s $service -i $avail -t $pref -f and also need to get the errors ,if any,in another file.
What's the right way to execute such commands in shell script?
Best regards,
Vishal (1 Reply)
Hi ,
I have to write a shell script to telnet to specific host and execute the admin command there. Please help me to do that.
Eg : telnet hostname portno
admin command
exit (3 Replies)
ssh -q <hostname> /opt/tcs/satish/tst.ksh
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh
tst.ksh has "nohup <command> & "
when i execute below script , its throwing error as
nohup can not be found
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh > log &
can someone let me... (5 Replies)
Hello,
I like to begin with :wall:.. literally... It has been 4 days and I have no idea how to fix it.
Environment - AIX 5.3
I wrote a script to call on ssh to log into another box via PKA to do something else.
If I run the script on the terminal, it works 100%. If the SAP customised... (11 Replies)
Hi All,
Linux lxs3er06 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux
Issue:
While executing shell scripts in bash shell, following error messages are thrown:
rm:command not found
On doing little investigation, I added '/bin' to $PATH and on doing echo... (9 Replies)
Hi,
I need to run a script whenever the Cron file is modified.
The requirement is whenever a user modifies the cron file, the script should run automatically.
Can you please provide your inputs ? (5 Replies)
Hello all,
I have just started doing shell scripting.
I want to read a file which stores the status of my job I have submitted
on a cluster.
The file looks something like this :
========================FILE=============================
crab: Checking the status of all jobs: please wait... (4 Replies)
Hi All
I am getting and error export command not found
What can be the possible reasons for this and how do we verify those
Please help me
Thanks (1 Reply)
I don't know why the following shell script doesn't work. Could you please help me out?
#!/usr/bin/ksh
test="cal > /tmp/tmp.txt 2>&1"
$test
I know it will work for the following format:
#!/usr/bin/ksh
cal > /tmp/tmp.txt 2>&1
However, I need to get the command from the user in... (1 Reply)