- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: script problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 02:47 PM
03-25-2004 02:47 PM
script problem
We have a clearcase running in our server.Normally to see a file in clearcase you need to do a cleartool setview.
Here are my script :
export PATH=$PATH:/usr/atria/bin
cleartool setview ship2 &
ls /vobs/nb_delivery/
but the problem is "ls /vobs/nb_delivery" shows nothing.
Executing the "cleartool setview ship2" in shell without script will succesfully mount the /vobs/nb_delivery and "ls /vobs/nb_delivery" will show an output.But when execute is script it shows nothing.
regards
mB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 02:55 PM
03-25-2004 02:55 PM
Re: script problem
Since you are running the "cleartool" part in the background, perhaps it doesnt complete before the ls starts.
Take out the "&" and see what happens.
Best regards,
Kent M. Ostby
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 03:02 PM
03-25-2004 03:02 PM
Re: script problem
As the cleartool command runs in background it might have not completed fully before executing ls.
So try removing &.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 05:43 PM
03-25-2004 05:43 PM
Re: script problem
Done that before but the result still the same.
regards
mB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 05:51 PM
03-25-2004 05:51 PM
Re: script problem
. ./script
-Karthik S S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 06:02 PM
03-25-2004 06:02 PM
Re: script problem
I do not know clearcase / cleartool. What do you mean:
"Normally to see a file in clearcase you need to do a cleartool setview"
Do you mean the ls command is a cleartool command? If so, you need something like
cleartool setview ship2 << ENDHERE
ls ...
exit (?)
ENDHERE
Or is the cleartool command supposed to create a file or directory?
JP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 06:14 PM
03-25-2004 06:14 PM
Re: script problem
If I remember correctly the latest clearcase versions are installed in /opt/ccase. In your current shell, what does a `which cleartool` tell you?
Anyway, it must be environment settings mixing things up for you, so you can try to add the next line to your script:
env > /tmp/env.file
And compare it to a env from your current shell. Maybe you set ccase env settings that aren't passed to children???
HTH,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 07:22 PM
03-25-2004 07:22 PM
Re: script problem
so your cleartool setview ship2 &
is actual a seperate shell from where your doing the ls /vobs/nb_delivery/
so your setview isn't occuring the shell your doing the ls.
now to get the listing i think there is a -e option for running a command, something like:
cleartool setview ship2 -e "ls /vobs/nb_delivery"
another way is to start the view,
cleartool setview ship2 & will do that, but I think there is a better command to use for this. then look at the view through the /view directory. ls /view/ship2/vobs/nb_delivery
it has been a while since i've worked with clearcase, so i'm not really specific.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2004 03:08 AM
03-26-2004 03:08 AM
Re: script problem
Curt was right with his remark about the new
subprocess created by 'cleartool setview'.
The correct command line syntax is
cleartool setview -exe 'cmd...' viewtag
to execute a single cmd in a view so
cleartool setview -exe 'ls /vobs/nb_delivery' ship2
will do it.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2004 07:18 PM
03-28-2004 07:18 PM
Re: script problem
/usr/atria/bin/cleartool << ENDTEST
setview ship2
!ls -l /vobs/nb_delivery/current/* > /tmp/telcel.old
!rm -rf /home/bscs_fam/telcel/*
!cp /vobs/nb_delivery/current/* /CCdisk/bscs_fam/telcel
!chmod 777 /CCdisk/bscs_fam/telcel/*
ENDTEST
regards
mB