implement -n for head cmd