7 ms·
Also, a side note, I would rather just run "head massivefile" or even better "less massivefile" (because, most probably I'd want to see past what head shows by
by amatai 10y ago
Also, a side note, I would rather just run "head massivefile" or even better "less massivefile" (because, most probably I'd want to see past what head shows by default). Running cat and then piping it to another program is inefficient, 2 forks + pipe.
- sigjuice 10y agoBut you miss out on this award if you don't use cat :p http://porkmail.org/era/unix/award.html http://porkmail.org/era/unix/award.html
- vram22 10y agoAnd on systems where head was not present (seen some earlier), but sed was, you could do: sed nq file where n is some positive integer, to print the first n lines of the file. Also, body (the complement of head and tail :) # body sed -n $1,$2p $3