<?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: help in script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896669#M403333</link>
    <description>steve :using 'grep ~ not work&lt;BR /&gt;&lt;BR /&gt;rsh 172.31.199.48 'grep IIT@speedy.com.a/opt/SUNWmsgsr/log/mail.log_current |grep " EA "|awk '{print $12}'|sort -u'</description>
    <pubDate>Mon, 18 Apr 2005 16:11:08 GMT</pubDate>
    <dc:creator>Jairo Campana</dc:creator>
    <dc:date>2005-04-18T16:11:08Z</dc:date>
    <item>
      <title>help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896659#M403323</link>
      <description>I need execute this line and not work:&lt;BR /&gt;(this not response)&lt;BR /&gt;rsh 172.31.199.48 grep IITT@speedy.com.ar /opt/SUNWmsgsr/log/mail.log_current|grep EA |awk '{print $12}' |sort|uniq&lt;BR /&gt;&lt;BR /&gt;========================================&lt;BR /&gt;(using ' ' )&lt;BR /&gt;rsh 172.31.199.48 grep 'IITT@speedy.com.ar /opt/SUNWmsgsr/log/mail.log_current|grep EA |awk '{print $12}' |sort|uniq'&lt;BR /&gt;awk: syntax error near line 1&lt;BR /&gt;awk: illegal statement near line 1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Apr 2005 15:28:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896659#M403323</guid>
      <dc:creator>Jairo Campana</dc:creator>
      <dc:date>2005-04-18T15:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896660#M403324</link>
      <description>I'm guessing that you mean remsh or rexec (for remote commands) rather than rsh (restricted shell).&lt;BR /&gt;&lt;BR /&gt;What O/S version is the server at 172.31.199.48?  And what O/S are you running from?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;...Steve...</description>
      <pubDate>Mon, 18 Apr 2005 15:38:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896660#M403324</guid>
      <dc:creator>Steve McKenna_3</dc:creator>
      <dc:date>2005-04-18T15:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896661#M403325</link>
      <description>A thought... maybe it's getting crossed up by the single quotes on the whole phrase and the single quotes for the awk?  What if you use double quotes for the outside?</description>
      <pubDate>Mon, 18 Apr 2005 15:40:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896661#M403325</guid>
      <dc:creator>Steve McKenna_3</dc:creator>
      <dc:date>2005-04-18T15:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896662#M403326</link>
      <description>p.s.   sort -u will eliminate one nesting level as well...</description>
      <pubDate>Mon, 18 Apr 2005 15:43:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896662#M403326</guid>
      <dc:creator>Steve McKenna_3</dc:creator>
      <dc:date>2005-04-18T15:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896663#M403327</link>
      <description>grep 'IITT@speedy.com.ar /opt/SUNWmsgsr/log/mail.log_current|grep EA |awk '{print \$12}' |sort|uniq'&lt;BR /&gt;&lt;BR /&gt;Escape $12 - \$12. also sort -u is enough.</description>
      <pubDate>Mon, 18 Apr 2005 15:48:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896663#M403327</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-04-18T15:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896664#M403328</link>
      <description>When you grep for EA, are there 12 fields to awk from?&lt;BR /&gt;&lt;BR /&gt;Also remember to use the shift function if you are looking for over $9 items.&lt;BR /&gt;&lt;BR /&gt;With the sort command you can include the -u as this is the unique flag to sort.</description>
      <pubDate>Mon, 18 Apr 2005 15:48:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896664#M403328</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-04-18T15:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896665#M403329</link>
      <description>steve:&lt;BR /&gt;double quotes for the outside not work&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Apr 2005 15:51:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896665#M403329</guid>
      <dc:creator>Jairo Campana</dc:creator>
      <dc:date>2005-04-18T15:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896666#M403330</link>
      <description>awk lets you address $12 directly.  In the test I ran on 11i, if you try to address $12 and there is none, no error is generated, just null output.</description>
      <pubDate>Mon, 18 Apr 2005 15:52:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896666#M403330</guid>
      <dc:creator>Steve McKenna_3</dc:creator>
      <dc:date>2005-04-18T15:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896667#M403331</link>
      <description>I'm looking at your command again..  just saw something...&lt;BR /&gt;&lt;BR /&gt;in the second example, shouldn't it be 'grep ~  rather than  grep 'IITT~  ?</description>
      <pubDate>Mon, 18 Apr 2005 15:54:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896667#M403331</guid>
      <dc:creator>Steve McKenna_3</dc:creator>
      <dc:date>2005-04-18T15:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896668#M403332</link>
      <description>when execute the command in the server locally without rsh its work!!!&lt;BR /&gt;using $12 of awk&lt;BR /&gt;&lt;BR /&gt;server locally:&lt;BR /&gt;##grep IITT@speedy.com.ar /opt/SUNWmsgsr/log/mail.log_current |grep " EA "|awk '{print $12}'|sort -u &lt;BR /&gt;output:&lt;BR /&gt;blinker@binker.com&lt;BR /&gt;&lt;BR /&gt;its work&lt;BR /&gt;&lt;BR /&gt;the problem is when  use rsh&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Apr 2005 16:05:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896668#M403332</guid>
      <dc:creator>Jairo Campana</dc:creator>
      <dc:date>2005-04-18T16:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896669#M403333</link>
      <description>steve :using 'grep ~ not work&lt;BR /&gt;&lt;BR /&gt;rsh 172.31.199.48 'grep IIT@speedy.com.a/opt/SUNWmsgsr/log/mail.log_current |grep " EA "|awk '{print $12}'|sort -u'</description>
      <pubDate>Mon, 18 Apr 2005 16:11:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896669#M403333</guid>
      <dc:creator>Jairo Campana</dc:creator>
      <dc:date>2005-04-18T16:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896670#M403334</link>
      <description>steve using : 'grep~&lt;BR /&gt;rsh 172.31.199.48 'grep IITT@speedy.com.a/opt/SUNWmsgsr/log/mail.log_current |grep " EA "|awk '{print $12}'|sort -u'&lt;BR /&gt;awk: syntax error near line 1&lt;BR /&gt;awk: illegal statement near line 1</description>
      <pubDate>Mon, 18 Apr 2005 16:11:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896670#M403334</guid>
      <dc:creator>Jairo Campana</dc:creator>
      <dc:date>2005-04-18T16:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896671#M403335</link>
      <description>write a script to rsh with called "doit"&lt;BR /&gt;&lt;BR /&gt;on the first line, specify your shell (in the shebang line)&lt;BR /&gt;&lt;BR /&gt;i.e.&lt;BR /&gt;&lt;BR /&gt;#/bin/sh&lt;BR /&gt;&lt;BR /&gt;grep `IITT@speedy.com.ar /opt/SUNWmsgsr/log/mail.log_current|grep EA |/bin/awk '{print $12}' |sort|uniq `&lt;BR /&gt;&lt;BR /&gt;Note the changes in the first and last quote that I made  -&lt;BR /&gt;&lt;BR /&gt;anyway - chmod doit to 755 and place it on an accessible automount point, or... place it on the system.&lt;BR /&gt;&lt;BR /&gt;then&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;rsh 172.31.199.48 -n /path_to/doit&lt;BR /&gt;&lt;BR /&gt;good luck &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Apr 2005 16:42:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896671#M403335</guid>
      <dc:creator>Jim Butler</dc:creator>
      <dc:date>2005-04-18T16:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896672#M403336</link>
      <description>rsh 172.31.199.48 -n `grep "IITT@speedy.com.ar" /opt/SUNWmsgsr/log/mail.log_current | grep EA |awk '{print $12}' |sort|uniq `&lt;BR /&gt;&lt;BR /&gt;If you want to use the rsh without "doit"&lt;BR /&gt;&lt;BR /&gt;surround the execute string in the single tic's (the ~` key) and let her rip - that should work for you.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Apr 2005 16:46:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896672#M403336</guid>
      <dc:creator>Jim Butler</dc:creator>
      <dc:date>2005-04-18T16:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896673#M403337</link>
      <description>doit no work&lt;BR /&gt;my log contains these data:&lt;BR /&gt;I need  to obtain the field awk $12.&lt;BR /&gt;&lt;BR /&gt;can replace "awk" by another command?&lt;BR /&gt;&lt;BR /&gt;log:&lt;BR /&gt;&lt;BR /&gt;19-Apr-2005 01:50:57.63 4b6f.1e14.25248 tcp_auth     tcp_local    EA 130 IITT@speedy.com.ar  rfc822;IITT@speedy.com.ar  IITT@speedy.com.ar  &amp;lt;0IF600ECPG4IWF90@tdimso48.backend.tdata.com.ar&amp;gt; *IITT@speedy.com.ar  &lt;BR /&gt;&lt;BR /&gt;I need the field *IITT@speedy.com.ar</description>
      <pubDate>Tue, 19 Apr 2005 08:09:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896673#M403337</guid>
      <dc:creator>Jairo Campana</dc:creator>
      <dc:date>2005-04-19T08:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896674#M403338</link>
      <description>this works but the answer is very slow:&lt;BR /&gt;rsh 10.1.1.10 -n grep IITT@speedy.com.ar /opt/SUNWmsgsr/log/mail.log_current  |grep " EA "|awk '{print $14}'|sort -u&lt;BR /&gt;&lt;BR /&gt;without command |sort -u&lt;BR /&gt;rsh 10.1.1.10 grep IITT@speedy.com.ar /opt/SUNWmsgsr/log/mail.log_current  |grep " EA "|awk '{print $12}'&lt;BR /&gt;&lt;BR /&gt;this works, and the answer is very fast but the result is:&lt;BR /&gt;*IITT@speedy.com.ar&lt;BR /&gt;*IITT@speedy.com.ar&lt;BR /&gt;*IITT@speedy.com.ar&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;that I can do&lt;BR /&gt;thanks&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Apr 2005 08:29:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896674#M403338</guid>
      <dc:creator>Jairo Campana</dc:creator>
      <dc:date>2005-04-19T08:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: help in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896675#M403339</link>
      <description>thanks, solved:&lt;BR /&gt;this works but the answer is very slow:&lt;BR /&gt;rsh 10.1.1.10 -n grep IITT@speedy.com.ar /opt/SUNWmsgsr/log/mail.log_current |grep " EA "|awk '{print $12}'|sort -u&lt;BR /&gt;&lt;BR /&gt;the filed $awk is $12&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Apr 2005 13:55:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-script/m-p/4896675#M403339</guid>
      <dc:creator>Jairo Campana</dc:creator>
      <dc:date>2005-04-19T13:55:06Z</dc:date>
    </item>
  </channel>
</rss>

