<?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 Linux shell scripting in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583452#M18709</link>
    <description>Hello, all, I have this script with a whole bunch of "if" statements. &lt;BR /&gt;&lt;BR /&gt;How is it possible to make it into a nested "if' statement or if there is such a thing. &lt;BR /&gt;&lt;BR /&gt;Does anyone else have any idea how to make this a better script?</description>
    <pubDate>Fri, 15 Jul 2005 05:59:06 GMT</pubDate>
    <dc:creator>Ragni Singh</dc:creator>
    <dc:date>2005-07-15T05:59:06Z</dc:date>
    <item>
      <title>Linux shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583452#M18709</link>
      <description>Hello, all, I have this script with a whole bunch of "if" statements. &lt;BR /&gt;&lt;BR /&gt;How is it possible to make it into a nested "if' statement or if there is such a thing. &lt;BR /&gt;&lt;BR /&gt;Does anyone else have any idea how to make this a better script?</description>
      <pubDate>Fri, 15 Jul 2005 05:59:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583452#M18709</guid>
      <dc:creator>Ragni Singh</dc:creator>
      <dc:date>2005-07-15T05:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Linux shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583453#M18710</link>
      <description>Well, nested is exactally as you think it should be:&lt;BR /&gt;&lt;BR /&gt;if [ condition ]&lt;BR /&gt;then&lt;BR /&gt;if [ nextcondition ]&lt;BR /&gt;then&lt;BR /&gt;if [ anothercondition ]&lt;BR /&gt;then&lt;BR /&gt;code&lt;BR /&gt;fi&lt;BR /&gt;fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Or in-line:&lt;BR /&gt;&lt;BR /&gt;if [ condition -a nextcondition -a anothercondition ]&lt;BR /&gt;then&lt;BR /&gt;code&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Or perhaps you'd prefer a case:&lt;BR /&gt;&lt;BR /&gt;case value in&lt;BR /&gt;  value1) code ;;&lt;BR /&gt;  value2) code ;;&lt;BR /&gt;  *) defaultcode ;;&lt;BR /&gt;esac</description>
      <pubDate>Fri, 15 Jul 2005 06:05:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583453#M18710</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-07-15T06:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Linux shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583454#M18711</link>
      <description>&lt;BR /&gt;case is ideal for these kind of situation. &lt;BR /&gt;&lt;BR /&gt;if that is not possible you can use if-elif-fi&lt;BR /&gt;&lt;BR /&gt;eg:&lt;BR /&gt;if &lt;CONDITION&gt; &lt;BR /&gt;then&lt;BR /&gt;    &lt;STATEMENTS&gt;&lt;BR /&gt;elif &lt;CONDITION&gt;&lt;BR /&gt;then&lt;BR /&gt;    &lt;STATEMENTS&gt;&lt;BR /&gt;else&lt;BR /&gt;    &lt;STATEMENTS&gt;&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Gopi&lt;/STATEMENTS&gt;&lt;/STATEMENTS&gt;&lt;/CONDITION&gt;&lt;/STATEMENTS&gt;&lt;/CONDITION&gt;</description>
      <pubDate>Fri, 15 Jul 2005 06:25:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583454#M18711</guid>
      <dc:creator>Gopi Sekar</dc:creator>
      <dc:date>2005-07-15T06:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Linux shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583455#M18712</link>
      <description>Maybe a "case" statement might work better for you.  It's hard to say without seeing the script.</description>
      <pubDate>Sat, 16 Jul 2005 01:58:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583455#M18712</guid>
      <dc:creator>Steve_160</dc:creator>
      <dc:date>2005-07-16T01:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Linux shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583456#M18713</link>
      <description>Oops.  Sorry, Gopi.  :-/  I didn't mean to repeat what you said.  When the question first came up on the screen there were no replies shown.</description>
      <pubDate>Sat, 16 Jul 2005 02:01:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583456#M18713</guid>
      <dc:creator>Steve_160</dc:creator>
      <dc:date>2005-07-16T02:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Linux shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583457#M18714</link>
      <description>&lt;BR /&gt;steve,&lt;BR /&gt;for that matter i indeed repeated stuart's suggestion :)&lt;BR /&gt;&lt;BR /&gt;if you are not able to see the replies, then raise it as an issue to  moderators</description>
      <pubDate>Sat, 16 Jul 2005 02:50:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583457#M18714</guid>
      <dc:creator>Gopi Sekar</dc:creator>
      <dc:date>2005-07-16T02:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Linux shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583458#M18715</link>
      <description>See the Advanced Bash-Scripting Guide at &lt;A href="http://www.tldp.org/LDP/abs/html/testconstructs.html" target="_blank"&gt;http://www.tldp.org/LDP/abs/html/testconstructs.html&lt;/A&gt; for more examples.&lt;BR /&gt;&lt;BR /&gt;-Ross</description>
      <pubDate>Sat, 16 Jul 2005 07:28:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-shell-scripting/m-p/3583458#M18715</guid>
      <dc:creator>Ross Minkov</dc:creator>
      <dc:date>2005-07-16T07:28:35Z</dc:date>
    </item>
  </channel>
</rss>

