Forum Discussion
niazstinu
Feb 08, 2021Brass Contributor
How to Read Certain line in Powershell
How can I read line number 10 from a text file ?1
- Feb 08, 2021
There are multiple way
The easiest is Load the file and select the line you need as its an array
$x=Get-content C:\MyFile.txt
$x[9]
Or you can use this way
$x | select -First 1 -Skip 9
farismalaeb
Feb 08, 2021Iron Contributor
There are multiple way
The easiest is Load the file and select the line you need as its an array
$x=Get-content C:\MyFile.txt
$x[9]
Or you can use this way
$x | select -First 1 -Skip 9
niazstinu
Feb 09, 2021Brass Contributor