SUMMARY2 -script question - passing variable to ufsdump

From: Laurence Moughan <Laurence.Moughan_at_aerlingus.com>
Date: Fri Oct 29 2004 - 11:04:47 EDT
and thanks to Mark for reducing my script to 2 lines !

d=`date +%w`

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

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.
*******************************************************************************
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Oct 29 11:07:01 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:39 EST