Jeremie Courreges-Anglas said: > The situation is a bit muddy. :) > 1. GNU head obeys the last command line option > 2. FreeBSD errors out if both -c and -n are specified > 3. NetBSD always follows -c if it has been specified, probably mixing -c > and -n was overlooked > 4. busybox is a bit more broken: > > $ printf '%s\n' a b c d e | busybox head -c 2 -n 5 > a > b > c$ > > ie if -c is passed it always specifies the byte-counting behavior, but > the actual byte count can be modified by subsequent -n options... > > I prefer 1. 'cause I see no reason to do 2.
FWIW our tail(2) does 2, so IMO head should as well. -- Dmitrij D. Czarkoff
