473,480 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Trying to write a Clearcase command script for UNIX vob

2 New Member
Hi everyone I am new to perl and I am writing a perl script to invoke a set of commands on UNIX clearcase vob however I am having trouble after setting the view and mounting the vob I want to change the directory into the vob and then using Cwd or pwd to confirm I am in the vob to continue the CC functions.

Sample code in perl :
Expand|Select|Wrap|Line Numbers
  1. $Result = system 'cleartool setview admin_view';
  2.  
  3.  
  4. $Result = system ('cleartool mount /vobs/test');
  5.  
  6.  
  7. chdir "/vobs/test" or die "/vobs/test: $!\n";
  8. Cwd;
  9.  

out put:


unixbox:newtoperl> perl UNIX.pl

Pass value = 1
Fail value = 1unixbox:newtoperl>
Sep 13 '07 #1
2 4246
numberwhun
3,509 Recognized Expert Moderator Specialist
Hi everyone I am new to perl and I am writing a perl script to invoke a set of commands on UNIX clearcase vob however I am having trouble after setting the view and mounting the vob I want to change the directory into the vob and then using Cwd or pwd to confirm I am in the vob to continue the CC functions.

Sample code in perl :
Expand|Select|Wrap|Line Numbers
  1. $Result = system 'cleartool setview admin_view';
  2.  
  3.  
  4. $Result = system ('cleartool mount /vobs/test');
  5.  
  6.  
  7. chdir "/vobs/test" or die "/vobs/test: $!\n";
  8. Cwd;
  9.  

out put:


unixbox:newtoperl> perl UNIX.pl

Pass value = 1
Fail value = 1unixbox:newtoperl>
First, please be sure and use code tags around your code. I have added them to your post already.

Second, Cwd is not used correctly. Read that link and you will see that you "use" it then reference its functions. It is essentially a Perl module, not a command.

Regards,

Jeff
Sep 13 '07 #2
perlnewbie
2 New Member
First, please be sure and use code tags around your code. I have added them to your post already.

Second, Cwd is not used correctly. Read that link and you will see that you "use" it then reference its functions. It is essentially a Perl module, not a command.

Regards,

Jeff

thanks I was able to set it up and it worked.
Sep 13 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4306
by: Tony George | last post by:
Hi, I'm having a problem using the Copy module on a ClearCase view that's been set as "readonly" (i.e. ct chview -readonly <view tag>). I want to copy a file out of this view and put it in...
10
2907
by: Andrew Baker | last post by:
I have just found a very serious bug in the way Visual Studio interfaces with Clearcase... I found that once you have opened a code file in the IDE, the IDE caches this file and does not re-read...
2
1935
by: George Ter-Saakov | last post by:
Hi, Somehow i need to call perl script that is on another Unix machine form my C# code. The problem is that this perl script is executed form command line (no apache on that machine). Is...
2
2580
by: loial | last post by:
In unix shell script I can do the following to get the status and values returned by a unix command OUTPUT=`some unix command` STATUS=$? if then exit 1 else set $OUTPUT
11
1407
by: Michele Simionato | last post by:
The subject says it all, I would like a script to act differently when called as $ python script.py and when called as $ python -i script.py. I looked at the sys module but I don't see a way to...
1
2298
parajaganesh
by: parajaganesh | last post by:
I am using Windows ClearCase Explorer. I do some scripting process to create a new view in ClearCase. But it cannot be displayed in the current screen. We need to press Alt + F5 after running my...
1
5500
by: georgewa | last post by:
Greetings all, great forum, this is my first post. Recently trying to write a script that is designed to move files based on timestamps. I am fairly new to Perl, so please bare with me. I have...
0
1246
by: gokulskm | last post by:
hai, i'm working clearcase unix side, here i try to find the old view list,pls help me for complete this program: chomp(@view="cleartool lsview -s | grep $name"); system(@view); foreach...
3
2025
by: Ben Keshet | last post by:
I have a probably simple beginner's question - I have a script that I am currently able to print its output. instead, i want to write it into a file - I tried different versions of write() but...
0
7039
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7037
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
6895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5326
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4770
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4476
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.