<?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: export variable in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109519#M148519</link>
    <description>Hi,&lt;BR /&gt;if you run your script like this:&lt;BR /&gt;# sh -x &lt;YOUR_SCRIPT&gt;&lt;/YOUR_SCRIPT&gt; &lt;BR /&gt;what error messages do you get? &lt;BR /&gt;Btw: does the first line: from "for  USER" until and including the second backqoute appear on a single line? &lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
    <pubDate>Tue, 04 Nov 2003 08:30:56 GMT</pubDate>
    <dc:creator>john korterman</dc:creator>
    <dc:date>2003-11-04T08:30:56Z</dc:date>
    <item>
      <title>export variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109513#M148513</link>
      <description>Hi2all,&lt;BR /&gt;&lt;BR /&gt;I have some bad problem with a script who should check all my users whose password is the same as the login - name. I tried it with  an ftp - server.&lt;BR /&gt;&lt;BR /&gt;Here it is:&lt;BR /&gt;for USER in `/usr/bin/ypcat passwd | awk &lt;BR /&gt;-F: '{print $1}' `&lt;BR /&gt;do&lt;BR /&gt;                                                                               &lt;BR /&gt; {&lt;BR /&gt;    ftp -n  &amp;lt;&amp;lt; !&lt;BR /&gt;        open SERVER&lt;BR /&gt;        user $USER $USER&lt;BR /&gt;        &lt;BR /&gt;!&lt;BR /&gt;    }                                                                                 &lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;The problem is, variable $USER isnÂ´t seen in &lt;BR /&gt;the ftp - call.&lt;BR /&gt;&lt;BR /&gt;thank</description>
      <pubDate>Tue, 04 Nov 2003 05:17:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109513#M148513</guid>
      <dc:creator>Bauder, Alexander</dc:creator>
      <dc:date>2003-11-04T05:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: export variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109514#M148514</link>
      <description>Use export USER and see if that works or&lt;BR /&gt;after &lt;BR /&gt;for USER in `/usr/bin/ypcat passwd | awk &lt;BR /&gt;-F: '{print $1}' `&lt;BR /&gt;do&lt;BR /&gt;export user=$USER &lt;BR /&gt;and then use $user in ftp script</description>
      <pubDate>Tue, 04 Nov 2003 05:26:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109514#M148514</guid>
      <dc:creator>Rajeev  Shukla</dc:creator>
      <dc:date>2003-11-04T05:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: export variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109515#M148515</link>
      <description>It is also possible to create a .netrc file with the script and then call the "ftp &lt;SERVERNAME&gt;" in your script. Check the return codes for the result if the username=password.&lt;BR /&gt;&lt;/SERVERNAME&gt;</description>
      <pubDate>Tue, 04 Nov 2003 05:44:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109515#M148515</guid>
      <dc:creator>Hoefnix</dc:creator>
      <dc:date>2003-11-04T05:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: export variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109516#M148516</link>
      <description>This came up before.&lt;BR /&gt;&lt;BR /&gt;Inside a here document (ie the bit between the "&amp;lt;&amp;lt;" and the "!", some characters, including $, need escaping.&lt;BR /&gt;&lt;BR /&gt;Try changing "$USER" to "\$USER" both times.&lt;BR /&gt;&lt;BR /&gt;-- Graham</description>
      <pubDate>Tue, 04 Nov 2003 06:31:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109516#M148516</guid>
      <dc:creator>Graham Cameron_1</dc:creator>
      <dc:date>2003-11-04T06:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: export variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109517#M148517</link>
      <description>My previous post was wrong.&lt;BR /&gt;&lt;BR /&gt;Here's the earlier thread, doesn't look like it was resolved though....&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=242133" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=242133&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;- Graham</description>
      <pubDate>Tue, 04 Nov 2003 07:28:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109517#M148517</guid>
      <dc:creator>Graham Cameron_1</dc:creator>
      <dc:date>2003-11-04T07:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: export variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109518#M148518</link>
      <description>Hello folks,&lt;BR /&gt;&lt;BR /&gt;thank you very much for your reply!&lt;BR /&gt;&lt;BR /&gt;IÂ´d tried the export - dialog before I called the forum, but there it doesnÂ´t work, and now it does?!?&lt;BR /&gt;&lt;BR /&gt;How can I get the Returncode ( $? )??&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Nov 2003 08:26:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109518#M148518</guid>
      <dc:creator>Bauder, Alexander</dc:creator>
      <dc:date>2003-11-04T08:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: export variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109519#M148519</link>
      <description>Hi,&lt;BR /&gt;if you run your script like this:&lt;BR /&gt;# sh -x &lt;YOUR_SCRIPT&gt;&lt;/YOUR_SCRIPT&gt; &lt;BR /&gt;what error messages do you get? &lt;BR /&gt;Btw: does the first line: from "for  USER" until and including the second backqoute appear on a single line? &lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Tue, 04 Nov 2003 08:30:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109519#M148519</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-11-04T08:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: export variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109520#M148520</link>
      <description>Hi,&lt;BR /&gt;first: dont use the variable name USER - it is used internally on some systems.&lt;BR /&gt;&lt;BR /&gt;second: Send the ftp-command via a pipe&lt;BR /&gt;&lt;BR /&gt;(KSH-like):&lt;BR /&gt;for usr in $(ypcat passwd | awk -F: '{print $1}')&lt;BR /&gt;do&lt;BR /&gt;  ftpout=$(print "open SERVER\nuser $usr $usr" | ftp -n 2&amp;gt;&amp;amp;1)&lt;BR /&gt;  [ -z "$ftpout" ] &amp;amp;&amp;amp; print $usr&lt;BR /&gt;done</description>
      <pubDate>Tue, 04 Nov 2003 08:31:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109520#M148520</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2003-11-04T08:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: export variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109521#M148521</link>
      <description>Hey folks,&lt;BR /&gt;&lt;BR /&gt;thank you all for help. &lt;BR /&gt;&lt;BR /&gt;Greethings,&lt;BR /&gt;&lt;BR /&gt;Alex</description>
      <pubDate>Tue, 04 Nov 2003 10:39:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-variable/m-p/3109521#M148521</guid>
      <dc:creator>Bauder, Alexander</dc:creator>
      <dc:date>2003-11-04T10:39:54Z</dc:date>
    </item>
  </channel>
</rss>

