[cciug] invoking Cleartool find in Bourne shell script

From: David Bainbridge (david.bainbridge@uab.ericsson.se)
Date: Wed Jan 19 2000 - 05:48:53 EST


Hi,

How can I invoke cleartool find in a bourne shell script? (I am using CC
3.2.1 on Solaris)

Here's an example:

#!/bin/sh

VOB=${2}

BR=${1}

BRANCH_QUERY="cleartool find ${VOB} -branch 'brtype(${BR})' -print"

echo "$BRANCH_QUERY"

if [ -n `${BRANCH_QUERY}` :="" ]; then
   echo "branch exists"
   exit 0
else
   echo "branch does not exist"
   exit 1
fi

When I run this I get:
cleartool: Error: Unrecognized operator: "'brtype'

If I execute the echo'ed command it works!

I have tried various approaches to solving this (including RTFM) but no
success ...

Any ideas anyone?

Dave

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:22:31 EDT