[Veritas-bu] bpduplicate
2001-12-20 20:26:20
Subject: |
[Veritas-bu] bpduplicate |
From: |
jonw AT n2h2 DOT com (Jon Walton) |
Date: |
Thu, 20 Dec 2001 17:26:20 -0800 (PST) |
John, my guess is the command output you are looking for is STDERR, not
STDOUT. I would do something like this:
VALIDATE=`bpduplicate -p -id ${TAPE_ID} 2>&1`
This will redirect STDERR into STDOUT so you can capture the text.
Regards,
Jon
On Wed, 19 Dec 2001, Camara, John wrote:
> I'm writing a script that will expire tapes greater than 30 days old and
> move them into the scratch pool. Before I do that however, I'd like to run
> a test to verify that the tapes have been vaulted. The method I've been
> attempting to use in Solaris 2.7 is as follows:
>
> bpduplicate -p -id ${TAPE_ID}
> If the command returns
> INF - found no images or media matching the selection criteria
> Then I know the tape has been duplicated.
>
> That's fine one at a time, but when I script it I want to assign it to a
> variable.
> However, I can't seem to assign the above string to a variable.
>
> for example:
> VALIDATE=`bpduplicate -p -id ${TAPE_ID}`
> If I echo $VALIDATE it returns nothing.
>
> Does anyone know how I can get the output of bpduplicate into a variable.
> If not, does anyone out there have a different way of validating that a tape
> has been vaulted?
>
> Thanks,
> John Camara
>
>
>
>
>
|
|
|