<?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: Setting value for multiple variables in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255128#M887873</link>
    <description>That's because you are thinking "perl"&lt;BR /&gt; &lt;BR /&gt;It should be "VAR=xxx" not "$VAR=xxx"</description>
    <pubDate>Wed, 21 Apr 2004 09:28:45 GMT</pubDate>
    <dc:creator>Mark Grant</dc:creator>
    <dc:date>2004-04-21T09:28:45Z</dc:date>
    <item>
      <title>Setting value for multiple variables</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255127#M887872</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;I want to initialize several variables with the same value. I try to use a for loop&lt;BR /&gt;&lt;BR /&gt;for VAR in A B C ; do&lt;BR /&gt;  $VAR=xxx&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;but I get error messages :&lt;BR /&gt;./myscript[21]: A=:  not found</description>
      <pubDate>Wed, 21 Apr 2004 09:26:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255127#M887872</guid>
      <dc:creator>Sylvain CROUET</dc:creator>
      <dc:date>2004-04-21T09:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Setting value for multiple variables</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255128#M887873</link>
      <description>That's because you are thinking "perl"&lt;BR /&gt; &lt;BR /&gt;It should be "VAR=xxx" not "$VAR=xxx"</description>
      <pubDate>Wed, 21 Apr 2004 09:28:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255128#M887873</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-04-21T09:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Setting value for multiple variables</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255129#M887874</link>
      <description>That won't work either. &lt;BR /&gt;&lt;BR /&gt;This work but it's ugly !&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;for VAR in A B C ; do&lt;BR /&gt;eval $VAR=xxx&lt;BR /&gt;done&lt;BR /&gt;echo $A $B $C&lt;BR /&gt;&lt;BR /&gt;There must be a better way.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Nicolas</description>
      <pubDate>Wed, 21 Apr 2004 09:39:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255129#M887874</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-04-21T09:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Setting value for multiple variables</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255130#M887875</link>
      <description>&lt;BR /&gt;for V in A B C &lt;BR /&gt;do&lt;BR /&gt;export $V=xxx&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;is another way. gotta be a cleaner way. &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Apr 2004 09:41:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255130#M887875</guid>
      <dc:creator>Marvin Strong</dc:creator>
      <dc:date>2004-04-21T09:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Setting value for multiple variables</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255131#M887876</link>
      <description>Thanks Nicolas,&lt;BR /&gt;&lt;BR /&gt;Didn't read that one correctly :)</description>
      <pubDate>Wed, 21 Apr 2004 09:43:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255131#M887876</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-04-21T09:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Setting value for multiple variables</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255132#M887877</link>
      <description>You could use an array, if you use numerous variable.&lt;BR /&gt;&lt;BR /&gt;Also, I was looking at set and typeset builtin command but I can't make anthing of it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Apr 2004 09:51:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-value-for-multiple-variables/m-p/3255132#M887877</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-04-21T09:51:54Z</dc:date>
    </item>
  </channel>
</rss>

