<?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: Simple scripting issue that's got me stumped right now in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528130#M701445</link>
    <description>Use single quotes.</description>
    <pubDate>Tue, 19 Apr 2005 15:54:36 GMT</pubDate>
    <dc:creator>RAC_1</dc:creator>
    <dc:date>2005-04-19T15:54:36Z</dc:date>
    <item>
      <title>Simple scripting issue that's got me stumped right now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528128#M701443</link>
      <description>/usr/sbin/swlist | grep CPB | sort | tail -1&lt;BR /&gt; works fine on my local server&lt;BR /&gt;&lt;BR /&gt;But if I set a variable equal to the command&lt;BR /&gt;export CMD1="/usr/sbin/swlist | grep | sort | tail -1"&lt;BR /&gt;and then "$CMD1", it's not recognizing the pipe symbols and I get errors about "software | not found" and "sofware grep not found" etc. &lt;BR /&gt;&lt;BR /&gt;But a "remsh xxxxxxx $CMD1" works fine. &lt;BR /&gt;&lt;BR /&gt;I'm trying to get a script that will issue the same command on both the local server and a list of remote servers and I'm stumped why it's being treated differently on the local server. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Apr 2005 15:49:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528128#M701443</guid>
      <dc:creator>S.Rider</dc:creator>
      <dc:date>2005-04-19T15:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting issue that's got me stumped right now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528129#M701444</link>
      <description>Interesting ....&lt;BR /&gt;&lt;BR /&gt;try:&lt;BR /&gt;export CMD1='/usr/sbin/swlist | grep | sort | tail -1'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(' instead of ")</description>
      <pubDate>Tue, 19 Apr 2005 15:53:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528129#M701444</guid>
      <dc:creator>Alex Lavrov.</dc:creator>
      <dc:date>2005-04-19T15:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting issue that's got me stumped right now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528130#M701445</link>
      <description>Use single quotes.</description>
      <pubDate>Tue, 19 Apr 2005 15:54:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528130#M701445</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-04-19T15:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting issue that's got me stumped right now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528131#M701446</link>
      <description>Hey, just tried it on linux (don't have hp here) it's acting the same.&lt;BR /&gt;&lt;BR /&gt;Single quote didn't help, but:&lt;BR /&gt;&lt;BR /&gt;export CMD1="/usr/sbin/swlist | grep | sort | tail -1"&lt;BR /&gt;sh $CMD1&lt;BR /&gt;&lt;BR /&gt;worked fine.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;that's why it works with "remsh", it's just like running it with "sh".</description>
      <pubDate>Tue, 19 Apr 2005 15:57:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528131#M701446</guid>
      <dc:creator>Alex Lavrov.</dc:creator>
      <dc:date>2005-04-19T15:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting issue that's got me stumped right now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528132#M701447</link>
      <description>hi&lt;BR /&gt;&lt;BR /&gt;try this:&lt;BR /&gt;CMD1="/usr/sbin/swlist | grep | sort | tail -1"&lt;BR /&gt;eval $CMD1&lt;BR /&gt;&lt;BR /&gt;the problem is that you must force the shell to eval the line twice, the first one to substitute the variable, second one to exec the pipe. Is like:&lt;BR /&gt;&lt;BR /&gt;a="echo b=test"&lt;BR /&gt;eval $a&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;eval $(resize) in a xterm&lt;BR /&gt;&lt;BR /&gt;hope it helps</description>
      <pubDate>Tue, 19 Apr 2005 16:01:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528132#M701447</guid>
      <dc:creator>Cesare Salvioni</dc:creator>
      <dc:date>2005-04-19T16:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting issue that's got me stumped right now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528133#M701448</link>
      <description>Interestingly, the "problem" is with pipe. You could use&lt;BR /&gt;set CMD="ls -al" and run $CMD and it works fine.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Apr 2005 16:10:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528133#M701448</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-04-19T16:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting issue that's got me stumped right now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528134#M701449</link>
      <description>Thanks guys, fixed in minutes for me.  &lt;BR /&gt;Single quotes didn't help, "sh $CMD1" kept giving me "execute permission denied" but "eval $CMD1" worked great.</description>
      <pubDate>Tue, 19 Apr 2005 16:19:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528134#M701449</guid>
      <dc:creator>S.Rider</dc:creator>
      <dc:date>2005-04-19T16:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Simple scripting issue that's got me stumped right now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528135#M701450</link>
      <description>Another option is&lt;BR /&gt;&lt;BR /&gt;alias CMD1="/usr/sbin/swlist | grep | sort | tail -1"&lt;BR /&gt;CMD1&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Apr 2005 18:48:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-scripting-issue-that-s-got-me-stumped-right-now/m-p/3528135#M701450</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-04-22T18:48:54Z</dc:date>
    </item>
  </channel>
</rss>

