2015-09-26 15:43:40 +0100, Richard Russon: > I'd like to add an option to both head and tail, > to allow them to work with NUL-terminated lines of text > -z, --zero-terminated > > Thus allowing: > > find dir -type f -print0 | head -z -n 10 | xargs -0 command [...]
See also sed -z 10q as an alternative to head -zn 10 While we're at it, why not add it to every text utility (cut, paste, seq, yes, tac...) for those that don't have it already? -- Stephane