<?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 help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515035#M897913</link>
    <description>Pedro&lt;BR /&gt;&lt;BR /&gt;Thanks so far, this seems to work however, I presume $? is the return code from the last command?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Mon, 09 Apr 2001 12:00:38 GMT</pubDate>
    <dc:creator>Carlo Henrico_1</dc:creator>
    <dc:date>2001-04-09T12:00:38Z</dc:date>
    <item>
      <title>Scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515031#M897909</link>
      <description>Firstly where can I get some guidelines for scripting?&lt;BR /&gt;&lt;BR /&gt;Secondly, I need to test in one of my scripts whether one of the parameters entered ends with a ".h".  Any ideas on how I go about this please?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Carlo</description>
      <pubDate>Mon, 09 Apr 2001 10:05:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515031#M897909</guid>
      <dc:creator>Carlo Henrico_1</dc:creator>
      <dc:date>2001-04-09T10:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515032#M897910</link>
      <description>If you are already familiar with the basics of scripting a good reference as always are the manpages of the various shells:&lt;BR /&gt;&lt;BR /&gt;man sh&lt;BR /&gt;man sh-posix&lt;BR /&gt;man ksh&lt;BR /&gt;man csh&lt;BR /&gt;&lt;BR /&gt;Otherwise get a text book for your preferred shell.&lt;BR /&gt;I always found the O'Reilly books quite worthwhile.&lt;BR /&gt;&lt;BR /&gt;Here is a suggestion for testing for header filename suffixes passed as parameters to a script (though this is not particularly elegant and could be done better)&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;for param in $*; do&lt;BR /&gt;    if [ "${param#*.}" = "h" ]; then&lt;BR /&gt;        # do something&lt;BR /&gt;    fi&lt;BR /&gt;done</description>
      <pubDate>Mon, 09 Apr 2001 10:57:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515032#M897910</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2001-04-09T10:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515033#M897911</link>
      <description>Hi Carlo!&lt;BR /&gt;echo &lt;PARAMETER&gt; |grep .h &amp;gt; /dev/null&lt;BR /&gt;if [ $? != 0 ]; then&lt;BR /&gt;or &lt;BR /&gt;if [ $? = 0 ]; then&lt;BR /&gt;&lt;BR /&gt;example:&lt;BR /&gt;echo $2 |grep .h &amp;gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;good luck.&lt;/PARAMETER&gt;</description>
      <pubDate>Mon, 09 Apr 2001 11:01:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515033#M897911</guid>
      <dc:creator>Pedro Sousa</dc:creator>
      <dc:date>2001-04-09T11:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515034#M897912</link>
      <description>Carlo:&lt;BR /&gt;&lt;BR /&gt;See these two threads for a sampling of suggestions for good references/guides to shell scripting:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xb75e7e990647d4118fee0090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xb75e7e990647d4118fee0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xbb5e7e990647d4118fee0090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xbb5e7e990647d4118fee0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 09 Apr 2001 11:10:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515034#M897912</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-04-09T11:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515035#M897913</link>
      <description>Pedro&lt;BR /&gt;&lt;BR /&gt;Thanks so far, this seems to work however, I presume $? is the return code from the last command?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 09 Apr 2001 12:00:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515035#M897913</guid>
      <dc:creator>Carlo Henrico_1</dc:creator>
      <dc:date>2001-04-09T12:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515036#M897914</link>
      <description>That's true...! Just to check if it went OK.&lt;BR /&gt;If the result is 0, then the argument has .h, if it's not then it hasn't.</description>
      <pubDate>Mon, 09 Apr 2001 12:16:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2515036#M897914</guid>
      <dc:creator>Pedro Sousa</dc:creator>
      <dc:date>2001-04-09T12:16:14Z</dc:date>
    </item>
  </channel>
</rss>

