<?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: Perl scriptin help in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936806#M102521</link>
    <description>Thanks for your prompt replies.&lt;BR /&gt;I need help on another scenario like.&lt;BR /&gt;&lt;BR /&gt;Looking for shell command to trim the message text to length to n characters.&lt;BR /&gt;&lt;BR /&gt;Each message text strings needs to be trimed to n no. of characters. &lt;BR /&gt;&lt;BR /&gt;Sure you guys have some good ideas.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Rajesh</description>
    <pubDate>Thu, 27 Oct 2005 04:22:27 GMT</pubDate>
    <dc:creator>Rajesh SB</dc:creator>
    <dc:date>2005-10-27T04:22:27Z</dc:date>
    <item>
      <title>Perl scriptin help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936801#M102516</link>
      <description>Hi Scritping Gurus,&lt;BR /&gt;&lt;BR /&gt;I am beginner in Perl Scripting. Looking for help.&lt;BR /&gt;&lt;BR /&gt;I want search for the ERROR message in a log file based on Keyword and detected line message text needs to be truncated to 90 characters. &lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Rajesh</description>
      <pubDate>Thu, 27 Oct 2005 02:06:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936801#M102516</guid>
      <dc:creator>Rajesh SB</dc:creator>
      <dc:date>2005-10-27T02:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Perl scriptin help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936802#M102517</link>
      <description>My perl skills are same as yours. Just plain grep and cut here.&lt;BR /&gt;&lt;BR /&gt;grep -i "ERROR" your_file | cut -c1-90</description>
      <pubDate>Thu, 27 Oct 2005 02:20:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936802#M102517</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-10-27T02:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Perl scriptin help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936803#M102518</link>
      <description>TIMTOWTDI,&lt;BR /&gt; &lt;BR /&gt;e.g. one possible way&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;perl -ne 'printf"%s\n", substr($_,0,30) if /error/i' /var/adm/syslog/syslog.log</description>
      <pubDate>Thu, 27 Oct 2005 02:20:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936803#M102518</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2005-10-27T02:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Perl scriptin help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936804#M102519</link>
      <description>Oops, forgot it was the leading 90 chars you are after.&lt;BR /&gt;So substitute 30 by 90 in the substr() call.&lt;BR /&gt; &lt;BR /&gt;Also have a look at&lt;BR /&gt; &lt;BR /&gt;perldoc -f substr&lt;BR /&gt;perldoc perlre&lt;BR /&gt;perldoc perlop</description>
      <pubDate>Thu, 27 Oct 2005 02:23:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936804#M102519</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2005-10-27T02:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Perl scriptin help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936805#M102520</link>
      <description>You can use awk / cut / perl on this simple requirement.&lt;BR /&gt;&lt;BR /&gt;awk '/&lt;PATTERN&gt;/ { substr($0,1,90); print; }' &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;-Muthu&lt;/FILENAME&gt;&lt;/PATTERN&gt;</description>
      <pubDate>Thu, 27 Oct 2005 02:54:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936805#M102520</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-27T02:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Perl scriptin help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936806#M102521</link>
      <description>Thanks for your prompt replies.&lt;BR /&gt;I need help on another scenario like.&lt;BR /&gt;&lt;BR /&gt;Looking for shell command to trim the message text to length to n characters.&lt;BR /&gt;&lt;BR /&gt;Each message text strings needs to be trimed to n no. of characters. &lt;BR /&gt;&lt;BR /&gt;Sure you guys have some good ideas.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Rajesh</description>
      <pubDate>Thu, 27 Oct 2005 04:22:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936806#M102521</guid>
      <dc:creator>Rajesh SB</dc:creator>
      <dc:date>2005-10-27T04:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Perl scriptin help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936807#M102522</link>
      <description>Again cut is the command that you need.&lt;BR /&gt;&lt;BR /&gt;echo "your_string"|cut -c1-5&lt;BR /&gt;Will cut first 5 chars.</description>
      <pubDate>Thu, 27 Oct 2005 04:28:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936807#M102522</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-10-27T04:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Perl scriptin help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936808#M102523</link>
      <description>Use script as,&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;# Input&lt;BR /&gt;pattern=""&lt;BR /&gt;count=""&lt;BR /&gt;file=""&lt;BR /&gt;&lt;BR /&gt;grep "${pattern}" ${file} | cut -c1-${count}&lt;BR /&gt;&lt;BR /&gt;# end&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;-Muthu</description>
      <pubDate>Thu, 27 Oct 2005 04:32:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936808#M102523</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-27T04:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Perl scriptin help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936809#M102524</link>
      <description>with perl:&lt;BR /&gt;&lt;BR /&gt;perl -e '$count=5;$pattern="no";while(&amp;lt;&amp;gt;){ printf "%s\n", substr($_,1,$count) if /$pattern/; }' &lt;FILENAME1&gt; &lt;FILENAME2&gt; ..&lt;BR /&gt;&lt;BR /&gt;Change $count value from 5 to your need. And $pattern from no to someother string in "".&lt;BR /&gt;&lt;BR /&gt;-Muthu&lt;/FILENAME2&gt;&lt;/FILENAME1&gt;</description>
      <pubDate>Thu, 27 Oct 2005 04:42:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936809#M102524</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-27T04:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Perl scriptin help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936810#M102525</link>
      <description>Thanks for quick response. I got it.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Rajesh</description>
      <pubDate>Thu, 27 Oct 2005 05:00:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936810#M102525</guid>
      <dc:creator>Rajesh SB</dc:creator>
      <dc:date>2005-10-27T05:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Perl scriptin help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936811#M102526</link>
      <description>Rajesh,&lt;BR /&gt;&lt;BR /&gt;It is good that you got solution. Before closing thread, send out the answer you got or concluding. If you don't want to assing points then turn to 0 for that response. &lt;BR /&gt;&lt;BR /&gt;Plz assign relavent points to good responses always.&lt;BR /&gt;&lt;BR /&gt;PS: Assign 0 points (If you open again :) )&lt;BR /&gt;&lt;BR /&gt;-Muthu</description>
      <pubDate>Thu, 27 Oct 2005 05:18:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-scriptin-help/m-p/4936811#M102526</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-27T05:18:43Z</dc:date>
    </item>
  </channel>
</rss>

