删除第一行
Get-Content a.txt | Select-Object -Skip 1 | Set-Content b.txt
复制代码
删除前2行
Get-Content a.txt | Select-Object -Skip 2 | Set-Content b.txt
复制代码
删除前3行
Get-Content a.txt | Select-Object -Skip 3 | Set-Content b.txt
复制代码
Get-Content a.txt | Select-Object -Skip 1 | Set-Content b.txt
复制代码
Get-Content a.txt | Select-Object -Skip 2 | Set-Content b.txt
复制代码
Get-Content a.txt | Select-Object -Skip 3 | Set-Content b.txt
复制代码