Bug 21766

Summary: [PATCH] add -s (skip) flag to head(1)
Product: Base System Reporter: Peter Pentchev <roam>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Peter Pentchev 2000-10-05 14:00:04 UTC
It is sometimes useful to display, say, the *second* 20 lines of a file.
Yes, I am perfectly aware that head -40 | tail -20 works, but having
head(1) able to skip lines/bytes is a little bit better in my book :)

The attached patch adds a -s flag, expecting a numeric argument; that
number of lines/bytes is skipped, after which the quantity requested
by -n or -c (or the implicit 10) are displayed as usual.

How-To-Repeat: 
Try to display the second 20 (or 800 in my case) lines of a file;
watch yourself go through loops ;)
Comment 1 Brian Somers freebsd_committer freebsd_triage 2005-01-12 02:57:59 UTC
State Changed
From-To: open->closed

This will never be implemented (IMHO) -- tail has this functionailty.  The 
originator should use ``tail +801 file | head +800'' to resolve their problem.