首页 > 解决方案 > How to delete first line of a file from powershell ise?

问题描述

I have a file with the content of

09-JAN-2018
12-FEB-2018
13-MAR-2018

Could you help me on, How could I delete the first line of the file from PowerShell.

Thank you in advance

标签: powershell

解决方案


这会从 file1.txt 中获取不带第一行的数据,然后将其打印到 file2.txt

Get-Content file1.txt | Select-Object -Skip 1 | Out-File file2.txt

但了解您使用的是 .txt 文件、.csv、.xml 还是其他类型的文件会很有用。


推荐阅读