Re: How can I see content of lines 453555 until 453590 of text file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Carroll Grigsby wrote:
> On Monday 08 May 2006 09:06, Peter Teuben wrote:
>> you could explicitly code it via awk (i'm sure perl has a shortcut
>> for this too, but it's not in my head):
>>
>>  	awk '{if (NR>=453555 && NR<= 453590) print $0 }' your_big_file
>>
>> it might be a bit slow on big files though.  tail can also be used
>> , but you have to do math:
>>
>>  	tail +453555 your_big_file | tail -45
>>
>> give or take a line. awk is probably safer, since you don't have to
>> think about 0 vs. 1 and subtract two big numbers
> 
> I may not know anything about perl or awk, but I am certain that
> subtracting 453555 from 433590 gives 35, not 45.

Really?

$ echo 433590 - 453555 | bc
- -19965

Damn typos.  They must be programmed to show up more often in
sentences that contain words like positive and certain.  ;-)

- -- 
Todd        OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
======================================================================
The world keeps ending but new people too dumb to know it keep showing
up as if the fun's just started.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl.

iG0EARECAC0FAkRf7IomGGh0dHA6Ly93d3cucG9ib3guY29tL350bXovcGdwL3Rt
ei5hc2MACgkQuv+09NZUB1pxzwCdFkDIDwGGMPxfsld93/L8U4Ib4ZMAn1hifg98
0gHxRDIN4Xs+jgEH8zlz
=7JZN
-----END PGP SIGNATURE-----

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux