clearcase shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting clearcase shell script
# 1  
Old 02-24-2012
clearcase shell script

I am running all clearcase commands in shell script and every command is redirecting output to file data.txt
Code:
cleartool diffbl -act -ver label1 label2 >& data.txt
cleartool diffbl -baselines label1 label2 >& data.txt
cleartool diffbl -elements label1 label2 >& data.txt

Issues was all commands are running fine and generating diff log files and it's not appending the output in same file..

please anyone suggest how to proceed ?

Last edited by Scott; 02-24-2012 at 05:50 AM.. Reason: Code tags
# 2  
Old 02-24-2012
In order to append the output to the same file you will habe to use the >> operator instead of >
# 3  
Old 02-24-2012
syntax error near unexpected token `&'
if i use >>& .

Code:
cleartool diffbl -act -ver label1 label2 >>& data.txt
cleartool diffbl -baselines label1 label2 >>& data.txt
cleartool diffbl -elements label1 label2 >>& data.txt

Is there any other way ?

Moderator's Comments:
Mod Comment Please use code tags
# 4  
Old 02-24-2012
Does that ClearTool command write anything to standard error?

If not, just use >> without the &. The >& notation is bash, so, if there's no option to append output, replace it with the more conventional 2>&1 >> data.txt method.
# 5  
Old 02-24-2012
With out using >& command is not redirecting the output to a file ..
2>&1 >> data.txt this didn't help. this is shell script , i am running on linux
# 6  
Old 02-24-2012
Oops Smilie

Code:
>>date.txt 2>&1

# 7  
Old 02-25-2012
>> data.txt 2>&1 should work
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

clearcase,

Hi, I have two unix server. In one server clearcase is installed. I want to take files from one server to clearcase server. Could anyone help to start up this, for how to connect clearcase server from my main server. ?? Currently am having IP address of that clearcase server. Thanks in... (0 Replies)
Discussion started by: ckchelladurai
0 Replies

2. Shell Programming and Scripting

shell script for clearcase ucm

how to write shell script to get the checkin information between two composite baselines in clearcase ucm . (0 Replies)
Discussion started by: saku
0 Replies

3. Shell Programming and Scripting

Anyone here use Clearcase command from shell?

I am coding a korn shell script to automate certain things. Creating a baseline is one of them where I got stuck. I google'd and found the available options of using mkbl command. Inside my script this is what I am doing: cleartool mkbl -all <myBaselineNumber in XXX.XXX.XXX.XXX format> ... (1 Reply)
Discussion started by: dahlia84
1 Replies

4. UNIX for Dummies Questions & Answers

Clearcase Query

Hi, Can you please help? I am trying to use variables within a clearcase command, however i am having a major problems - the variables don't appear to be accessible. Using the following as an example: cat=1 2 3 dog=4 5 6 cleartool mkattr -replace Four_Legs '"$cat $dog"' lbtype:Animal ... (3 Replies)
Discussion started by: spikey
3 Replies

5. UNIX for Dummies Questions & Answers

Korn Shell Script / Clearcase Query

Hi, I wonder can you help me ... I have the following clearcase code that works on the command line: ct mkattr -replace Four_Legs '"cat dog"' lbtype:Animal however when i try to use it in my script it fails with the following error message: + ct mkattr -replace Four_Legs "cat dog"... (5 Replies)
Discussion started by: thegant
5 Replies

6. Solaris

Clearcase compatibility with Solaris 10

Hi, Is Clearcase version 2002.05.00 is supported and compatible with Solaris10? Cheers, Ankur (1 Reply)
Discussion started by: sharmaankur85
1 Replies

7. Shell Programming and Scripting

Connect to Clearcase through Unix

Hi, How can I connect to clearcase view through Unix. I have this view r232_view in Clearcase. I tried this from my home directory >cleartool setview r232_view >cleartool: Error: View tag not found: "r232_view". Am I missing something? Thanks, (5 Replies)
Discussion started by: northwest
5 Replies

8. Shell Programming and Scripting

Clearcase set into a view with script

Hi Friends, How do i set into a view and continue with make via a script. I could do both separately but when i try both in a single script, it stops after setting into the view. below is the sample "ap_script", first two execute, but the third one command doesn't. echo $USER cleartool... (2 Replies)
Discussion started by: arunp46
2 Replies

9. Linux

RPM with ClearCase

Hello. I have a task to complete and it involves using RPM with ClearCase. I have looked through as much documentation as possible about RPM and I still have questions about it. My task is to create a .rpm using ClearCase by unzipping a 22 Mb file and placing it into a set directory structure. I... (2 Replies)
Discussion started by: mastachef
2 Replies

10. UNIX for Advanced & Expert Users

ssh + clearcase hangs

Hi, prefix: cleartool is an clearcase command. clearcase is a control version tool I have setup a passwordless ssh connection between Unix machines A and B. I am executing a ssh command from Unix box 'A' to Unix box 'B' as follows. ssh username@B 'ls /home/username' This works perfectly... (2 Replies)
Discussion started by: sunilav
2 Replies
Login or Register to Ask a Question