Korn Shell Script / Clearcase Query


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Korn Shell Script / Clearcase Query
# 1  
Old 02-25-2010
Korn Shell Script / Clearcase Query

Hi,
I wonder can you help me ... I have the following clearcase code that works on the command line:

Code:
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" lbtype:Animal
cleartool: Error: Pathname not found: "dog"".
cleartool: Error: Invalid string value: ""cat".



What this code is trying to do is:
Create a clearcase attribute called Four_Legs that contains 'cat dog' on the label Animal!


The weird thing is, it works on the command line.
Any help would be very much appreciated - its driving me mad.

Thanks,
thegant
# 2  
Old 02-25-2010
Can you show us your script?
# 3  
Old 02-26-2010
Hi fpmurphy,
Just got the issue resolved - problem was i was using:
Code:
ct mkattr -replace Four_Legs '"cat dog"' lbtype:Animal

When i changed ct to cleartool it worked!!

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

Thanks for your help and interest..
kind regards,
thegant
# 4  
Old 02-26-2010
Thanks for letting us know the solution.
# 5  
Old 03-05-2010
Hi,
Can you please help?
Similar to the query above, but i am trying to use variables within a clearcase command:

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


My code--
However i am trying to use cat & dog as variables that are stored in the script:
Code:
cat=123
dog=456

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

The problem is I am explicity getting $cat and $dog, rather than the vairables i have them set too (123, 456).

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

regards,
spike
# 6  
Old 03-05-2010
If you've got a new question, please post it as a new thread, instead of appending to an existing thread.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

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

Korn Script to connect and query oracle database

I've been sent the following script to finish. It's supposed to connect to an oracle database, query it, and send an email if the query result value is one or more. Currently it isn't connecting properly, just giving the following error: ERROR: ORA-01017: invalid username/password; logon denied... (2 Replies)
Discussion started by: jackmorgan2007
2 Replies

4. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 Replies

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

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

7. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

8. Shell Programming and Scripting

Setting variable for query using iSql / Korn Shell

Hi All- First time using iSql. I have 4 query files - some have more than 1 line of sql statements After a bit of research it appears I can just use the -i command and specify the input file. Questions: Does it matter that there are multiple queries in each file? Do I need to have... (3 Replies)
Discussion started by: Cailet
3 Replies

9. AIX

Help with Korn Shell script

I have this Korn shell script that runs via a cron entry. It runs in a loop "watching" a specific file system for files with a certain name. The file system that it is watching is an upload file system for an FTP server. When files that are the correct name come in, it takes the extension of the... (1 Reply)
Discussion started by: heprox
1 Replies

10. UNIX Desktop Questions & Answers

korn shell script

hi all i am writing the korn shell script. i have a SQL script which gives me the folowing output DSA.WLG.20050713211544.20051025.20050713211544 28991 1130198400 DSA.WLG.20050713211544.20051025.20050713211544 25881 1130198400 DSA.WLG.20050711210100.20051025.20050711210100 25881 ... (3 Replies)
Discussion started by: pavan_test
3 Replies
Login or Register to Ask a Question