SUMMARY -script question - passing variable to ufsdump

2007-12-25 4:08:00

Wow - speedy response for a friday afternoon,

>From many people, - Thanks u all esp' Ramji

'script is attempting to interpolate a variable
called $duf. In fact, you want a variable called $d concatenated with
a
string "uf".

You express this as:

ufsdump ${d}uf /dev ....'

so edited as

ufsdump ${d}uf /dev/rmt/0 /dev/md/dsk/d50

oh - io also got my source and dump devise wrong way round ! -

going home now .

............................................

Helo,

can someone please advise what is wrong with below,

#!/bin/ksh
set -x

d=`date | awk '{print $1}'`
echo $d
case $d in
"Mon") d="1" ;;
"Tue") d="2" ;;
"Wed") d="3" ;;
"Thu") d="4" ;;
"Fri") d="5" ;;
"Sat") d="6" ;;
"Sun") d="0" ;;
esac
echo $d

ufsdump $duf /dev/md/dsk/d50 /dev/rmt/0

when run the ufsdump switchs are ignored,

+ + awk {print $1}
+ date
d=Fri
+ echo Fri
Fri
+ d=5
+ echo 5
5
+ ufsdump /dev/md/dsk/d50 /apps1/dump
DUMP: Bad option `/'
DUMP: The ENTIRE dump is aborted.

TIA

Laurence
humble poor scripter

For low fares and great deals on hotels, car hire and travel insurance visit http://www.aerlingus.com
of any action in reliance upon, this information by persons or entities
other than the intended recipient is prohibited.If you have received
this email in error please notify the sender immediately and delete
the material.
*******************************************************************************

Comments

Got something to say?

You must be logged in to post a comment.