Clearcase Query


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Clearcase Query
# 1  
Old 03-05-2010
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:

Code:
cat=1 2 3
dog=4 5 6

cleartool mkattr -replace Four_Legs '"$cat $dog"' lbtype:Animal

The problem is I am explicity getting $cat and $dog as my result, rather than the vairables i have them set too (1 2 3, 4 5 6).

Has any one any idea how i can resolve this problem??
Please.

regards,
spike
# 2  
Old 03-05-2010
Loose the single quotes, as they prohibit interpolation of the variables contents. If you need to have the double quotes as part of the value, write
Code:
cleartool mkattr -replace Four_Legs "\"$cat $dog\"" lbtype:Animal

instead
# 3  
Old 03-05-2010
Hi Pludi,
Thanks a million - I would have never figured it out - thanks, thanks, thanks Smilie
# 4  
Old 05-19-2010
Hi there,

when using ClearCase for UNIX, you might wanna have a look at completion script for Bash: ClearCase Completion for Bash | Jan Tomka

Cheers,
Jan
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 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

clearcase shell script

I am running all clearcase commands in shell script and every command is redirecting output to file data.txt 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... (6 Replies)
Discussion started by: saku
6 Replies

3. 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

4. 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

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. 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

9. 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