Unix/BSD head implementation