Dos/cmd Equivalent To Head

[Solved] Dos/cmd Equivalent To Head | Basic - Code Explorer | yomemimo.com
Question : dos/cmd equivalent to "head"

Answered by : plamen-grozdanov

findstr /n "." myfile.txt | findstr "^.:"

Source : https://stackoverflow.com/questions/1295068/windows-equivalent-of-the-tail-command | Last Update : Wed, 14 Apr 21

Question : dos/cmd equivalent to "head"

Answered by : plamen-grozdanov

C:\> netstat -an > temp.txt && for /l %l in (1,1,10) do @for /f "tokens=1,2* delims=:" %a in ('findstr /n /r "^" temp.txt ^| findstr /r "^%l:"') do @echo %b

Source : https://serverfault.com/questions/490841/how-to-display-the-first-n-lines-of-a-command-output-in-windows-the-equivalent/490842 | Last Update : Wed, 14 Apr 21

Answers related to dos/cmd equivalent to head

Code Explorer Popular Question For Basic