develooper Front page | perl.perl6.users | Postings from October 2022

How do I print the last three lines in a file?

Thread Next
From:
ToddAndMargo via perl6-users
Date:
October 23, 2022 03:28
Subject:
How do I print the last three lines in a file?
Message ID:
20a703ca-bfc6-9e77-cdcc-9465fd411746@zoho.com
Hi All,

Is there a way to print only the last three lines
in a long file (full on \n's).


In Windows, I am trying to such the last the  lines is

 > dir /s /A:-D /d /a
...
      Total Files Listed:
            13671 File(s)  3,265,285,462 bytes
             3917 Dir(s)  18,406,518,784 bytes free

And yes, I know how to do it, but IT AIN'T PRETTY!
I want pretty.

-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About