I have the command grep public -A 5
in Unix which prints the trailing 5 lines after the string public
.
I need to do the same in Windows using command prompt. How do I do it?
I have the command grep public -A 5
in Unix which prints the trailing 5 lines after the string public
.
I need to do the same in Windows using command prompt. How do I do it?
with powershell
powershell -command "Get-ChildItem *.* | Select-String 'public' -context 0,5"
where *.*
is replaced with filename pattern