How to write from n-th row to a file using perl -


I have a source text in a file and is looking for code that is the second (or EN) in general Print) Row and print a different file from this file.

Any ideas how to do that?

You basically do it in Perl and by special variables ( .. Can be used internally), in which the current line number is:

  prints from # stdin to 3 to 8 lines: while ( 

Or from the command line:

  perl -wne'print if 3 .. 8 '& lt; Filename.txt & gt; & Gt; Output.txt  

You can also do it without a pell: head -n3 filename.txt | Tail-N1 & gt; & Gt; Output.txt


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -