Top "Unix-head" questions

The Unix `head` command displays the leading lines of a file.

How do I use Head and Tail to print specific lines of a file

I want to say output lines 5 - 10 of a file, as arguments passed in. How could I use head and …

shell unix arguments tail unix-head
What's the opposite of head? I want all but the first N lines of a file

Given a text file of unknown length, how can I read, for example all but the first 2 lines of the …

command-line scripting tail unix-head
Using combination of "head" and "tail" to display middle line of the file in Unix

If I have a file name myownfile.txt which contains 3 lines of text. foo hello world bar I want to …

unix tail unix-head
How to get the last lines of a file except the first 20?

Say I have a file with any number of lines, say, 125. I want to get all the lines except the …

shell unix tail unix-head
PowerShell equivalent for "head -n-3"?

I've been able to track down basic head/tail functionality: head -10 myfile <==> cat myfile | select -first 10 tail …

powershell tail unix-head
How can I use 'head' in a bash script with a variable?

I've been trying to create a script that can read a certain line off of a file given some variables …

bash unix-head
find results piped to zcat and then to head

I'm trying to search for a certain string in a lot of gziped csv files, the string is located at …

bash find pipe zcat unix-head