<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: case statement in a case statement in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/case-statement-in-a-case-statement/m-p/4971873#M101906</link>
    <description>Its ok i have found the sysntax error.&lt;BR /&gt;I forgot to put ;; after the inner case statement</description>
    <pubDate>Wed, 05 Apr 2006 04:45:47 GMT</pubDate>
    <dc:creator>thijs lankhorst_1</dc:creator>
    <dc:date>2006-04-05T04:45:47Z</dc:date>
    <item>
      <title>case statement in a case statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/case-statement-in-a-case-statement/m-p/4971872#M101905</link>
      <description>Hi there. Can anybody tell me if i can use a case statement in a case statement?&lt;BR /&gt;&lt;BR /&gt;For example in the following script i get a syntax error but i am pretty sure its caused due to the fact that it doesnt like the case into case statement: (see attachment)&lt;BR /&gt;&lt;BR /&gt;Any comments are much appreciated.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Apr 2006 04:32:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/case-statement-in-a-case-statement/m-p/4971872#M101905</guid>
      <dc:creator>thijs lankhorst_1</dc:creator>
      <dc:date>2006-04-05T04:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: case statement in a case statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/case-statement-in-a-case-statement/m-p/4971873#M101906</link>
      <description>Its ok i have found the sysntax error.&lt;BR /&gt;I forgot to put ;; after the inner case statement</description>
      <pubDate>Wed, 05 Apr 2006 04:45:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/case-statement-in-a-case-statement/m-p/4971873#M101906</guid>
      <dc:creator>thijs lankhorst_1</dc:creator>
      <dc:date>2006-04-05T04:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: case statement in a case statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/case-statement-in-a-case-statement/m-p/4971874#M101907</link>
      <description>You have to ;; in second case statements.&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;echo "What LAN card would you like to adjust: "&lt;BR /&gt;read card&lt;BR /&gt;&lt;BR /&gt;case "$card" in&lt;BR /&gt;&lt;BR /&gt;[Ee][Tt][Hh]0)&lt;BR /&gt;        lc=eth0&lt;BR /&gt;        ;;&lt;BR /&gt;[Ee][Tt][Hh]1)&lt;BR /&gt;        lc=eth1&lt;BR /&gt;        ;;&lt;BR /&gt;[Ee][Tt][Hh]2)&lt;BR /&gt;        lc=eth2&lt;BR /&gt;        ;;&lt;BR /&gt;[Ee][Tt][Hh]3)&lt;BR /&gt;        lc=eth3&lt;BR /&gt;        ;;&lt;BR /&gt;[Ee][Tt][Hh]4)&lt;BR /&gt;        lc=eth4&lt;BR /&gt;        ;;&lt;BR /&gt;[Ee][Tt][Hh]5)&lt;BR /&gt;        lc=eth5&lt;BR /&gt;        ;;&lt;BR /&gt;[Ee][Tt][Hh]6)&lt;BR /&gt;        lc=eth6&lt;BR /&gt;        ;;&lt;BR /&gt;*)&lt;BR /&gt;        echo "Wrong LAN card, exiting"&lt;BR /&gt;        exit 1&lt;BR /&gt;        ;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;spe=`ethtool $lc | grep -i speed | awk '{print $2}'`&lt;BR /&gt;dup=`ethtool $lc | grep -i duplex | awk '{print $2}'`&lt;BR /&gt;neg=`ethtool $lc | grep Auto | grep -v autog| awk '{print $2}'`&lt;BR /&gt;&lt;BR /&gt;echo "Current settings are:"&lt;BR /&gt;echo&lt;BR /&gt;echo "Card speed(S) is: $spe"&lt;BR /&gt;echo "Mode(M) is: $dup"&lt;BR /&gt;echo "Speed Negotiation(SN) is: $neg"&lt;BR /&gt;&lt;BR /&gt;echo&lt;BR /&gt;echo "What would you like to change (S/M/SN): "&lt;BR /&gt;read choice&lt;BR /&gt;&lt;BR /&gt;case "$choice" in&lt;BR /&gt;[Ss])&lt;BR /&gt;        echo "What card speed(10/100/1000) would you like?:  "&lt;BR /&gt;        read cs&lt;BR /&gt;        case "$cs" in&lt;BR /&gt;        10)&lt;BR /&gt;                ethtool -s $lc speed 10 duplex $dup autoneg $neg&lt;BR /&gt;                ;;&lt;BR /&gt;        100)&lt;BR /&gt;                ethtool -s $lc speed 100 duplex $dup autoneg $neg&lt;BR /&gt;                ;;&lt;BR /&gt;        1000)&lt;BR /&gt;                ethtool -s $lc speed 1000 duplex $dup autoneg $neg&lt;BR /&gt;                ;;&lt;BR /&gt;        *)&lt;BR /&gt;                echo "Incorrect speed, exiting"&lt;BR /&gt;                exit 1&lt;BR /&gt;                ;;&lt;BR /&gt;        esac&lt;BR /&gt;        ;;  # ADDED&lt;BR /&gt;[Mm])&lt;BR /&gt;        echo "What mode(FD/HD) would you like?: "&lt;BR /&gt;        read lm&lt;BR /&gt;        case "$lm" in&lt;BR /&gt;        [Ff][Dd])&lt;BR /&gt;                ethtool -s $lc speed $spe duplex full autoneg $neg&lt;BR /&gt;                ;;&lt;BR /&gt;        [Hh][Dd])&lt;BR /&gt;                ethtool -s $lc speed $spe duplex half autoneg $neg&lt;BR /&gt;                ;;&lt;BR /&gt;        *)&lt;BR /&gt;                echo "Incorrect mode, exiting"&lt;BR /&gt;                exit 1&lt;BR /&gt;                ;;&lt;BR /&gt;        esac&lt;BR /&gt;        ;;  # ADDED&lt;BR /&gt;[Ss][Nn])&lt;BR /&gt;        echo "What would you like AutoNegotiation(ON/OFF) to be?: "&lt;BR /&gt;        read an&lt;BR /&gt;        case "$an" in&lt;BR /&gt;        [Oo][Nn])&lt;BR /&gt;                ethtool -s $lc speed $spe duplex $dup autoneg on&lt;BR /&gt;                ;;&lt;BR /&gt;        [Oo][Ff][Ff])&lt;BR /&gt;                ethtool -s $lc speed $spe duplex $dup autoneg off&lt;BR /&gt;                ;;&lt;BR /&gt;        *)&lt;BR /&gt;                echo "Incorrect choice, exiting"&lt;BR /&gt;                exit 1&lt;BR /&gt;                ;;&lt;BR /&gt;        esac&lt;BR /&gt;        ;;  # ADDED&lt;BR /&gt;*)&lt;BR /&gt;        echo "Incorrect choice, exiting"&lt;BR /&gt;        exit 1&lt;BR /&gt;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;## END ###&lt;BR /&gt;&lt;BR /&gt;  # ADDED gives new lines added.&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Muthu</description>
      <pubDate>Wed, 05 Apr 2006 04:51:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/case-statement-in-a-case-statement/m-p/4971874#M101907</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2006-04-05T04:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: case statement in a case statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/case-statement-in-a-case-statement/m-p/4971875#M101908</link>
      <description>Thanks Muthukumar, just found it myself. Would have given you all the 10 points if i had not closed the thread. Sorry.</description>
      <pubDate>Wed, 05 Apr 2006 04:56:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/case-statement-in-a-case-statement/m-p/4971875#M101908</guid>
      <dc:creator>thijs lankhorst_1</dc:creator>
      <dc:date>2006-04-05T04:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: case statement in a case statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/case-statement-in-a-case-statement/m-p/4971876#M101909</link>
      <description>Your greetings are more valuable than points ;) &lt;BR /&gt;&lt;BR /&gt;A tip to you: Use sh -x &amp;lt;script&amp;gt; to get debugging informations always. &lt;BR /&gt;&lt;BR /&gt;Keep posting. &lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Muthu</description>
      <pubDate>Wed, 05 Apr 2006 04:57:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/case-statement-in-a-case-statement/m-p/4971876#M101909</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2006-04-05T04:57:52Z</dc:date>
    </item>
  </channel>
</rss>

