<?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: Script question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3565467#M227239</link>
    <description>number of arguments after the command on the command line is represented by $#&lt;BR /&gt;&lt;BR /&gt;command parm1 parm2 parm3&lt;BR /&gt;&lt;BR /&gt;if in the command, you have a line like echo $#, you will see 3 as output to the command line above&lt;BR /&gt;&lt;BR /&gt;Hope this helps</description>
    <pubDate>Thu, 16 Jun 2005 12:10:38 GMT</pubDate>
    <dc:creator>Mel Burslan</dc:creator>
    <dc:date>2005-06-16T12:10:38Z</dc:date>
    <item>
      <title>Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3565465#M227237</link>
      <description>What does '$#' represent ?&lt;BR /&gt;&lt;BR /&gt;I know '$?' is return code. Not sure about '$#'</description>
      <pubDate>Thu, 16 Jun 2005 12:03:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3565465#M227237</guid>
      <dc:creator>Nobody's Hero</dc:creator>
      <dc:date>2005-06-16T12:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3565466#M227238</link>
      <description>It's the number of arguments. Inside a function, it's the number of arguments passed to the function otherwise it's the number of argument passed on the command line. Note: The "shift" command, reduces ${#} so after doing a shift 2, for example, ${#} is now 2 less than the number actually passed.</description>
      <pubDate>Thu, 16 Jun 2005 12:09:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3565466#M227238</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-06-16T12:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3565467#M227239</link>
      <description>number of arguments after the command on the command line is represented by $#&lt;BR /&gt;&lt;BR /&gt;command parm1 parm2 parm3&lt;BR /&gt;&lt;BR /&gt;if in the command, you have a line like echo $#, you will see 3 as output to the command line above&lt;BR /&gt;&lt;BR /&gt;Hope this helps</description>
      <pubDate>Thu, 16 Jun 2005 12:10:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3565467#M227239</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2005-06-16T12:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3565468#M227240</link>
      <description>It's the number of arguments passed to a script excluding any command line options (which need to be parsed with the getopts command). Within the script the command line arguments equate to the positional parameters $1, $2, $3 all the way upto $9; with $0 being the name of the script itself.&lt;BR /&gt;&lt;BR /&gt;So if your script is named "script.ksh" and it takes arguments and options like...&lt;BR /&gt;&lt;BR /&gt;# script.ksh argument1 argument2 -o argument3&lt;BR /&gt;     |           |         |            |&lt;BR /&gt;    $0          $1        $2           $3&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Jun 2005 13:41:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3565468#M227240</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-06-16T13:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3565469#M227241</link>
      <description>$#  or ${#}  is the count of args&lt;BR /&gt;&lt;BR /&gt;eg:&lt;BR /&gt;cmd arg1 arg2 arg3&lt;BR /&gt;&lt;BR /&gt;${#}  = 3&lt;BR /&gt;${1} = arg1&lt;BR /&gt;${2} = arg2&lt;BR /&gt;${3} = arg3&lt;BR /&gt;${*} = "arg1 arg2 arg3"&lt;BR /&gt;${@} = "arg1" "arg2" "arg3"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Jun 2005 08:19:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3565469#M227241</guid>
      <dc:creator>Basheer_2</dc:creator>
      <dc:date>2005-06-17T08:19:51Z</dc:date>
    </item>
  </channel>
</rss>

