<?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: Scripting - conditional statments in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756849#M101736</link>
    <description>I don't know of any way for the if...fi statements. The "%" operator is used for matching the current parenthesis, braces or brackets.&lt;BR /&gt;&lt;BR /&gt;cheers!</description>
    <pubDate>Wed, 22 Mar 2006 13:45:59 GMT</pubDate>
    <dc:creator>Sandman!</dc:creator>
    <dc:date>2006-03-22T13:45:59Z</dc:date>
    <item>
      <title>Scripting - conditional statments</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756847#M101734</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Our script has multiple if statments. Is there any way to find out for a particular if statment where is the closing "fi" statment in vi editor?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 22 Mar 2006 13:34:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756847#M101734</guid>
      <dc:creator>Krish_4</dc:creator>
      <dc:date>2006-03-22T13:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting - conditional statments</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756848#M101735</link>
      <description>Shalom, &lt;BR /&gt;&lt;BR /&gt;You can install and compile the ehanced vi editor, designed for Linux. Or you can try and compile emacs.&lt;BR /&gt;&lt;BR /&gt;I do it the old fashioned way. I indent every if and make sure the concluding fi is indented the same number of characters.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 22 Mar 2006 13:42:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756848#M101735</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-03-22T13:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting - conditional statments</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756849#M101736</link>
      <description>I don't know of any way for the if...fi statements. The "%" operator is used for matching the current parenthesis, braces or brackets.&lt;BR /&gt;&lt;BR /&gt;cheers!</description>
      <pubDate>Wed, 22 Mar 2006 13:45:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756849#M101736</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-03-22T13:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting - conditional statments</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756850#M101737</link>
      <description>here's an awk script to do it if you are having trouble with one particular if or fi.&lt;BR /&gt;&lt;BR /&gt;Create a file called countem.awk&lt;BR /&gt;&lt;BR /&gt;/ if / {addit++; print addit, $0;next;}&lt;BR /&gt;/^if / {addit++; print addit, $0;next;}&lt;BR /&gt;/ fi / {print addit,$0; addit--;next;}&lt;BR /&gt;/^fi / {print addit,$0; addit--;next;}&lt;BR /&gt;/^fi$/ {print addit,$0; addit--;next;}&lt;BR /&gt;/ fi$/ {print addit,$0; addit--;next;}&lt;BR /&gt;{print $0}&lt;BR /&gt;&lt;BR /&gt;Then run: awk -f countem.awk &amp;lt; myfile | more&lt;BR /&gt;&lt;BR /&gt;If you use elses, you may need to make some modifications.  Basically you count up and then print the ifs and print then count down the fis.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2006 14:31:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756850#M101737</guid>
      <dc:creator>Kent Ostby</dc:creator>
      <dc:date>2006-03-22T14:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting - conditional statments</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756851#M101738</link>
      <description>Thanks for replying.&lt;BR /&gt;&lt;BR /&gt;I like steve's suggestion to install emacs.&lt;BR /&gt;&lt;BR /&gt;Steve - Once it is installed, how to do it? Is there any command like "%" in vi?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 22 Mar 2006 14:44:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756851#M101738</guid>
      <dc:creator>Krish_4</dc:creator>
      <dc:date>2006-03-22T14:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting - conditional statments</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756852#M101739</link>
      <description>I use gmacs and xemacs.  I just place my cursor at the if and it will highlight the body until the fi</description>
      <pubDate>Wed, 22 Mar 2006 15:11:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756852#M101739</guid>
      <dc:creator>David DiBiase</dc:creator>
      <dc:date>2006-03-22T15:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting - conditional statments</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756853#M101740</link>
      <description>emacs sound a bit overkill for writing scripts doesn't it? in this case i would go with vim. but hey, let's not start the holy war here ;)</description>
      <pubDate>Thu, 23 Mar 2006 04:40:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756853#M101740</guid>
      <dc:creator>dirk dierickx</dc:creator>
      <dc:date>2006-03-23T04:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting - conditional statments</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756854#M101741</link>
      <description>%           Move to the parenthesis or brace that matches the&lt;BR /&gt;                       parenthesis or brace at the current cursor position. Read man vi. &lt;BR /&gt;&lt;BR /&gt;Hope vi is not supporting this. Use emacs.&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Muthu</description>
      <pubDate>Thu, 23 Mar 2006 04:47:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-conditional-statments/m-p/3756854#M101741</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2006-03-23T04:47:42Z</dc:date>
    </item>
  </channel>
</rss>

