<?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: query on perl - awk in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894775#M820035</link>
    <description>Folks,&lt;BR /&gt;&lt;BR /&gt;Its just a part of a program. There is no way that I would have scratched my head for this, in case it would have been just a "two line" script, :)) :)).&lt;BR /&gt;&lt;BR /&gt;Tons of thanks,&lt;BR /&gt;Cheers !!!&lt;BR /&gt;Mathew.</description>
    <pubDate>Tue, 04 Feb 2003 02:51:14 GMT</pubDate>
    <dc:creator>Varghese Mathew</dc:creator>
    <dc:date>2003-02-04T02:51:14Z</dc:date>
    <item>
      <title>query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894763#M820023</link>
      <description>Folks,&lt;BR /&gt;&lt;BR /&gt;Being a novice in perl forces me to raise hands ...&lt;BR /&gt;&lt;BR /&gt;Any idea how do I correct the script:&lt;BR /&gt;The script looks like:&lt;BR /&gt;&lt;BR /&gt;#!/opt/perl/bin/perl                                              &lt;BR /&gt;`cksum "/home/vm/erlog" | (awk '{print $1}') &amp;gt; "/home/vm/erlog.cksum"`;&lt;BR /&gt;&lt;BR /&gt;I found the awk does not function properly in this perl script.&lt;BR /&gt;&lt;BR /&gt;thanks in advance.&lt;BR /&gt;Cheers !!!&lt;BR /&gt;Mathew.</description>
      <pubDate>Mon, 03 Feb 2003 03:09:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894763#M820023</guid>
      <dc:creator>Varghese Mathew</dc:creator>
      <dc:date>2003-02-03T03:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894764#M820024</link>
      <description>Hi Mathew,&lt;BR /&gt;&lt;BR /&gt;I'm no perl guru either, but the script runs fine for me. I used the cksum on the /var/adm/syslog.log file. Only thing I can think of is the version of perl your using. These are latest:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=PERL" target="_blank"&gt;http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=PERL&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Languages/perl-5.8.0/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Languages/perl-5.8.0/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Michael</description>
      <pubDate>Mon, 03 Feb 2003 03:37:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894764#M820024</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2003-02-03T03:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894765#M820025</link>
      <description>Hi Michael,&lt;BR /&gt;&lt;BR /&gt;Thanks for that ...&lt;BR /&gt;I have upgraded the perl version to 5.8.x from 5.6.1, now. but still no hope ...&lt;BR /&gt;&lt;BR /&gt;I would like to know how can we specify a specific shell like the "k shell" to be used for these shell command in side the perl script.&lt;BR /&gt;&lt;BR /&gt;Looks to me like it could be the posix shell issue.&lt;BR /&gt;&lt;BR /&gt;Cheers !!!&lt;BR /&gt;Mathew.</description>
      <pubDate>Mon, 03 Feb 2003 04:24:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894765#M820025</guid>
      <dc:creator>Varghese Mathew</dc:creator>
      <dc:date>2003-02-03T04:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894766#M820026</link>
      <description>I think your problem is that Perl is interpreting the $1 instead of passing it to awk.&lt;BR /&gt;&lt;BR /&gt;Try the following: Replace $1 in your script with \$1&lt;BR /&gt;&lt;BR /&gt;That should work.&lt;BR /&gt;&lt;BR /&gt;Incidentally, when I invoked Perl with -w (enable warnings), I was able to easily determine the problem since Perl printed a helpful error message.  I would recommend that you always execute Perl with -w.  You can do this in your script with:&lt;BR /&gt;&lt;BR /&gt;#!/opt/perl/bin/perl -w&lt;BR /&gt;&lt;BR /&gt;Also, it is unclear to me why you are paranthesizing the awk command (awk ...).  Doing so would invoke a subshell which in this case seems unnecessary.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Ajit&lt;BR /&gt;HP Gigabit Ethernet&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Feb 2003 04:42:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894766#M820026</guid>
      <dc:creator>Ajit Natarajan</dc:creator>
      <dc:date>2003-02-03T04:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894767#M820027</link>
      <description>which /opt/perl/bin/perl &lt;BR /&gt;&lt;BR /&gt;What answer to you get?&lt;BR /&gt;&lt;BR /&gt;I'm not sure going to Perl 5.8 is going to impact this.  Just make sure you are running the perl you think you are runing.  The script should work.&lt;BR /&gt;&lt;BR /&gt;I suppose check awk too.&lt;BR /&gt;&lt;BR /&gt;P&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Feb 2003 04:43:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894767#M820027</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-02-03T04:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894768#M820028</link>
      <description>Hi Ajit,&lt;BR /&gt;&lt;BR /&gt;Yeah your suggestion could solve the issue ..&lt;BR /&gt;&lt;BR /&gt;#!/opt/perl/bin/perl &lt;BR /&gt;`cksum "/home/vm/erlog" | (awk '{print \$1}') &amp;gt; "/home/vm/erlog.cksum"`; &lt;BR /&gt;d the issue..&lt;BR /&gt;&lt;BR /&gt;Could this be something related with the POSIX shell or otherwise how did my earlier syntax did work for Michael? !!&lt;BR /&gt;&lt;BR /&gt;Guys, many many thanks for that ..&lt;BR /&gt;&lt;BR /&gt;Cheers !!!&lt;BR /&gt;Mathew.</description>
      <pubDate>Mon, 03 Feb 2003 04:49:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894768#M820028</guid>
      <dc:creator>Varghese Mathew</dc:creator>
      <dc:date>2003-02-03T04:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894769#M820029</link>
      <description>Just for the record, I'm was running '/usr/bin/ksh' as 'root'</description>
      <pubDate>Mon, 03 Feb 2003 04:57:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894769#M820029</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2003-02-03T04:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894770#M820030</link>
      <description>The question might be why the .... this is a perl script. It does not use perl at all&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;cksum /home/vm/erlog | awk '{print $1}' &amp;gt; /home/vm/erlog.cksum&lt;BR /&gt;&lt;BR /&gt;does the same as a *shell* script with less overhead. Not that I object to perl, as the regulars will know, but there's a good tool for everything, and - in this case - it ain't perl.&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Feb 2003 16:52:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894770#M820030</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-02-03T16:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894771#M820031</link>
      <description>I'd like to agree to procura.&lt;BR /&gt;&lt;BR /&gt;Wrapping external commands like cksum *and* even awk in a Perl script isn't only silly but a waste of resources.&lt;BR /&gt;&lt;BR /&gt;But if you want to do your checksumming in soley Perl you could do it like this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;use Digest::MD5;&lt;BR /&gt;&lt;BR /&gt;open FH, '/your/file/to/checksum' &lt;BR /&gt;   or die "cannot open";&lt;BR /&gt;&lt;BR /&gt;$md5 = Digest::MD5-&amp;gt;new;&lt;BR /&gt;$md5-&amp;gt;addfile(*FH);&lt;BR /&gt;close FH;&lt;BR /&gt;$md5sum = $md5-&amp;gt;hexdigest;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Feb 2003 18:15:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894771#M820031</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2003-02-03T18:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894772#M820032</link>
      <description>&lt;BR /&gt;How about this:&lt;BR /&gt;&lt;BR /&gt;#!/opt/perl/bin/perl&lt;BR /&gt;$logfile="/home/vm/erlog.cksum";&lt;BR /&gt;open(file, "&amp;gt;&amp;gt;$logfile") || die "open $logfile for cksum append \n";&lt;BR /&gt;printf file "%d\n",`cksum /home/vm/erlog`;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 03 Feb 2003 18:39:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894772#M820032</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2003-02-03T18:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894773#M820033</link>
      <description>Harry, that would print two newlines. And it still does not warrant a perl script.&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Mon, 03 Feb 2003 18:46:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894773#M820033</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-02-03T18:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894774#M820034</link>
      <description>Merijn,&lt;BR /&gt;&lt;BR /&gt;I just tested it again and it put out a single line containing the first field of the output of cksum&lt;BR /&gt;&lt;BR /&gt;And I agree that it doesn't warrant the use of perl, but if it is part of a larger script, then maybe yes.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 03 Feb 2003 19:47:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894774#M820034</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2003-02-03T19:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: query on perl - awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894775#M820035</link>
      <description>Folks,&lt;BR /&gt;&lt;BR /&gt;Its just a part of a program. There is no way that I would have scratched my head for this, in case it would have been just a "two line" script, :)) :)).&lt;BR /&gt;&lt;BR /&gt;Tons of thanks,&lt;BR /&gt;Cheers !!!&lt;BR /&gt;Mathew.</description>
      <pubDate>Tue, 04 Feb 2003 02:51:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-perl-awk/m-p/2894775#M820035</guid>
      <dc:creator>Varghese Mathew</dc:creator>
      <dc:date>2003-02-04T02:51:14Z</dc:date>
    </item>
  </channel>
</rss>

