<?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: Command Question.. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5347041#M639445</link>
    <description>&lt;P&gt;Ah, I misread the OP as that it was required to add the line count to the end of the file.&lt;/P&gt;&lt;P&gt;Mea culpa.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Sep 2011 15:46:38 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2011-09-28T15:46:38Z</dc:date>
    <item>
      <title>Command Question..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5345965#M639439</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a file which looks like this -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Allan M&lt;/P&gt;&lt;P&gt;Allan T&lt;/P&gt;&lt;P&gt;John H&lt;/P&gt;&lt;P&gt;Terry P&lt;/P&gt;&lt;P&gt;Harry P&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to print the file as well as do a line count -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Allan M&lt;/P&gt;&lt;P&gt;Allan T&lt;/P&gt;&lt;P&gt;John H&lt;/P&gt;&lt;P&gt;Terry P&lt;/P&gt;&lt;P&gt;Harry P&lt;/P&gt;&lt;P&gt;﻿5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Want to do this as fast as it can be done, for example if we are talking about 10 miliion lines.&lt;/P&gt;&lt;P&gt;Need to do this in one single command without ";".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Allan.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2011 21:52:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5345965#M639439</guid>
      <dc:creator>allanm77</dc:creator>
      <dc:date>2011-09-27T21:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Command Question..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5345975#M639440</link>
      <description>&lt;P&gt;Hi Allan:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# perl -ple '$n++;END{print $n}'﻿ file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...JRF...&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2011 22:11:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5345975#M639440</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-09-27T22:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Command Question..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5345979#M639441</link>
      <description>Thanks JRF,&lt;BR /&gt;&lt;BR /&gt;Tried but getting error -&lt;BR /&gt;&lt;BR /&gt;Unrecognized character \xEF in column 19 at -e line 1&lt;BR /&gt;&lt;BR /&gt;Allan.</description>
      <pubDate>Tue, 27 Sep 2011 22:19:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5345979#M639441</guid>
      <dc:creator>allanm77</dc:creator>
      <dc:date>2011-09-27T22:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Command Question..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5345981#M639442</link>
      <description>&lt;P&gt;Hi (again) Allan:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1196371"&gt;@allanm77&lt;/a&gt; wrote:&lt;BR /&gt;Tried but getting error -&lt;BR /&gt;&lt;BR /&gt;Unrecognized character \xEF in column 19 at -e line 1&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Well, re-type what I posted.&amp;nbsp; However, here's an even shorter variation given your requirement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;perl -ple 'END{print $.}' file&lt;/PRE&gt;&lt;P&gt;...or if you prefer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;awk '{print};END{print NR}' file&lt;/PRE&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...JRF...&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2011 22:50:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5345981#M639442</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-09-27T22:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Command Question..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5346605#M639443</link>
      <description>&lt;P&gt;Of course I like the perl solution, but what is wrong with good old plain fast default unix tools?&lt;/P&gt;&lt;PRE&gt;$ wc -l&amp;lt;file&amp;gt;&amp;gt;file&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2011 10:50:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5346605#M639443</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2011-09-28T10:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Command Question..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5346987#M639444</link>
      <description>&lt;P&gt;&amp;gt;but what is wrong with good old plain fast default unix tools?﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because there is no tool the both prints and gives that count.&lt;/P&gt;&lt;P&gt;(Unless you use nl(1) or cat(1) to number each line.)&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2011 15:17:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5346987#M639444</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-09-28T15:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Command Question..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5347041#M639445</link>
      <description>&lt;P&gt;Ah, I misread the OP as that it was required to add the line count to the end of the file.&lt;/P&gt;&lt;P&gt;Mea culpa.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2011 15:46:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-question/m-p/5347041#M639445</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2011-09-28T15:46:38Z</dc:date>
    </item>
  </channel>
</rss>

