portable alternative to head (w/ or w/o -n)