<?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 Script Help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/4307584#M338865</link>
    <description>Can some one help me understand the following script?&lt;BR /&gt;&lt;BR /&gt;#-----------------&lt;BR /&gt;# functions&lt;BR /&gt;#-----------------&lt;BR /&gt;function Usage {&lt;BR /&gt;    echo "\nUsage: $1 [ -h ] \n"&lt;BR /&gt;    echo "where"&lt;BR /&gt;    echo "  -h = prints this message"&lt;BR /&gt;    echo "example: $1  \n "&lt;BR /&gt;}&lt;BR /&gt;#-----------------&lt;BR /&gt;&lt;BR /&gt;# Collect the input variables.  Check to see if they are correct.&lt;BR /&gt;&lt;BR /&gt;while getopts ":h" PARAMETER; do&lt;BR /&gt;  case $PARAMETER in&lt;BR /&gt;   h)  # Need some help.&lt;BR /&gt;     Usage $0&lt;BR /&gt;     exit 1&lt;BR /&gt;    ;;&lt;BR /&gt;   \?)&lt;BR /&gt;     Usage $0&lt;BR /&gt;     exit 1&lt;BR /&gt;    ;;&lt;BR /&gt;  esac&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;# Cleanout the variable list&lt;BR /&gt;shift $(($OPTIND - 1))&lt;BR /&gt;&lt;BR /&gt;This is in the beginning of the vg, lv creation scripts? Can some one please help me understand what this part of script does?</description>
    <pubDate>Mon, 17 Nov 2008 15:11:43 GMT</pubDate>
    <dc:creator>Waqar Razi</dc:creator>
    <dc:date>2008-11-17T15:11:43Z</dc:date>
    <item>
      <title>Script Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/4307584#M338865</link>
      <description>Can some one help me understand the following script?&lt;BR /&gt;&lt;BR /&gt;#-----------------&lt;BR /&gt;# functions&lt;BR /&gt;#-----------------&lt;BR /&gt;function Usage {&lt;BR /&gt;    echo "\nUsage: $1 [ -h ] \n"&lt;BR /&gt;    echo "where"&lt;BR /&gt;    echo "  -h = prints this message"&lt;BR /&gt;    echo "example: $1  \n "&lt;BR /&gt;}&lt;BR /&gt;#-----------------&lt;BR /&gt;&lt;BR /&gt;# Collect the input variables.  Check to see if they are correct.&lt;BR /&gt;&lt;BR /&gt;while getopts ":h" PARAMETER; do&lt;BR /&gt;  case $PARAMETER in&lt;BR /&gt;   h)  # Need some help.&lt;BR /&gt;     Usage $0&lt;BR /&gt;     exit 1&lt;BR /&gt;    ;;&lt;BR /&gt;   \?)&lt;BR /&gt;     Usage $0&lt;BR /&gt;     exit 1&lt;BR /&gt;    ;;&lt;BR /&gt;  esac&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;# Cleanout the variable list&lt;BR /&gt;shift $(($OPTIND - 1))&lt;BR /&gt;&lt;BR /&gt;This is in the beginning of the vg, lv creation scripts? Can some one please help me understand what this part of script does?</description>
      <pubDate>Mon, 17 Nov 2008 15:11:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/4307584#M338865</guid>
      <dc:creator>Waqar Razi</dc:creator>
      <dc:date>2008-11-17T15:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/4307585#M338866</link>
      <description>This script calls getopts(1) to crack the input line.  It is looking for "-h" and invoking the help message in the function Usage.&lt;BR /&gt;Unrecognized options goto the "?" case.&lt;BR /&gt;&lt;BR /&gt;After that is done, it shifts off the processed args, for OPTIND -1 args.</description>
      <pubDate>Mon, 17 Nov 2008 15:19:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/4307585#M338866</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-11-17T15:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/4307586#M338867</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;This is a standard way of processing commandline switches and arguments.  In this case, only one optional switch ('-h') is allowed.   Specifying '-h', or for that matter, any other flag or switch (an letter beginning with a hyphen) prints the name of the script and a usage message and then exits.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 17 Nov 2008 15:24:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/4307586#M338867</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-11-17T15:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/4307587#M338868</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;By the way, in case it wasn't clear, Dennis pointed you to the manpages for 'getopts' and those for 'sh-posix':&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60130/getopts.1.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60130/getopts.1.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60130/sh-posix.1.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60130/sh-posix.1.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;On the shell manpage, see also the information about OPTARG, OPTERR and OPTIND.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 17 Nov 2008 17:19:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/4307587#M338868</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-11-17T17:19:36Z</dc:date>
    </item>
  </channel>
</rss>

