<?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: A variable is taken as several parameter given to a function. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/a-variable-is-taken-as-several-parameter-given-to-a-function/m-p/3798993#M266246</link>
    <description>Without knowing how the function, fun_cel_mail_message, itself is written it's not possible to know but if the function is addressing your instantiation of ${emails_patitlo} as simply ${7} then then only thing that ${7} is going to contain is "user1@patito.com"&lt;BR /&gt;&lt;BR /&gt;What you can do is store the 1st 6 parameters into variables and then &lt;BR /&gt;shift 6&lt;BR /&gt;while [[ ${#} -ge 1 ]]&lt;BR /&gt;  do&lt;BR /&gt;    mail_something_to ${1}&lt;BR /&gt;    shift&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;or if you invoke your function like this:&lt;BR /&gt;fun_cel_mail_message 2 $SERVER_name 1001 2001 send ${www} "${emails_patito}"&lt;BR /&gt;&lt;BR /&gt;$7 will now contain the entire list. This is a case of the shell doing exactly what you are telling it to do.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 01 Jun 2006 20:13:17 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2006-06-01T20:13:17Z</dc:date>
    <item>
      <title>A variable is taken as several parameter given to a function.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-variable-is-taken-as-several-parameter-given-to-a-function/m-p/3798992#M266245</link>
      <description>Hi .. I have a function, and it looks like follows when is called:&lt;BR /&gt;&lt;BR /&gt;emails_patito="user1@patito.com user2@patito.com user3@patito.com user4@patito.com"&lt;BR /&gt;fun_cel_mail_message 2 $SERVER_name 1001 2001 send $www $emails_patito&lt;BR /&gt;&lt;BR /&gt;Question here is :&lt;BR /&gt;why i can not send the message to all people?&lt;BR /&gt;i mean, only is taken the first of them or the second of them !!!! why!!! i'm putting them between " " ....&lt;BR /&gt;&lt;BR /&gt;the parameter number 7 probably only take the first because exist a space between them , could be that ? what can i change this one to send to all of them ?&lt;BR /&gt;&lt;BR /&gt;thanks, Manuales.&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Jun 2006 18:45:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-variable-is-taken-as-several-parameter-given-to-a-function/m-p/3798992#M266245</guid>
      <dc:creator>Manuales</dc:creator>
      <dc:date>2006-06-01T18:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: A variable is taken as several parameter given to a function.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-variable-is-taken-as-several-parameter-given-to-a-function/m-p/3798993#M266246</link>
      <description>Without knowing how the function, fun_cel_mail_message, itself is written it's not possible to know but if the function is addressing your instantiation of ${emails_patitlo} as simply ${7} then then only thing that ${7} is going to contain is "user1@patito.com"&lt;BR /&gt;&lt;BR /&gt;What you can do is store the 1st 6 parameters into variables and then &lt;BR /&gt;shift 6&lt;BR /&gt;while [[ ${#} -ge 1 ]]&lt;BR /&gt;  do&lt;BR /&gt;    mail_something_to ${1}&lt;BR /&gt;    shift&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;or if you invoke your function like this:&lt;BR /&gt;fun_cel_mail_message 2 $SERVER_name 1001 2001 send ${www} "${emails_patito}"&lt;BR /&gt;&lt;BR /&gt;$7 will now contain the entire list. This is a case of the shell doing exactly what you are telling it to do.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Jun 2006 20:13:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-variable-is-taken-as-several-parameter-given-to-a-function/m-p/3798993#M266246</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-06-01T20:13:17Z</dc:date>
    </item>
  </channel>
</rss>

