Help required writing a case statement

From: Hardy, Andrew (Andrew.Hardy@marks-and-spencer.com)
Date: Wed Sep 15 2004 - 10:07:57 EDT


All,

I am writing a script which requires me to embed a for loop within a
case statement.
I have had a go at doing it (sample of code below), but this does not
run.
However, the for loop on its own does run okay.

Does anyone have any idea if this can be done & if so what's the best
way to write it ?

case $ANSWER in

        ALL) for drive in $ALL_DRIVE_LIST

do
        echo ""
        echo "****** Now releasing drive $drive ******"
        echo ""
                /usr/openv/volmgr/bin/vmoprcmd -crawlreleasebyname
$drive
done ;;

Thanks in advance.

Andy Hardy

        Andy Hardy
        Technical Specialist, Data Storage Services,
        Marks & Spencer PLC, 3 Longwalk Road,Room 1SW,
        Stockley Park, Uxbridge,Middesex,UB11 1AW.
        * 020 8718 5975
        * 07733 333324
* mailto:andrew.hardy@marks-and-spencer.com

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

Registered Office:
Marks and Spencer plc
Waterside House
35 North Wharf Road
London
W2 1NW

Registered No. 214436 in England and Wales.

Telephone (020) 7935 4422
Facsimile (020) 7487 2670

www.marksandspencer.com

Please note that electronic mail may be monitored.

This e-mail is confidential. If you received it by mistake, please let us know
and then delete it from your system; you should not copy, disclose, or
distribute its contents to anyone nor act in reliance on this e-mail, as this
is prohibited and may be unlawful.

The registered office of Marks and Spencer Financial Services PLC, Marks and
Spencer Unit Trust Management Limited, Marks and Spencer Life Assurance
Limited and Marks and Spencer Savings and Investments Limited is Kings Meadow,
Chester, CH99 9FB. These firms are authorised and regulated by the Financial
Services Authority.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:26 EDT