powershell - 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
解决方案
这会从 file1.txt 中获取不带第一行的数据,然后将其打印到 file2.txt
Get-Content file1.txt | Select-Object -Skip 1 | Out-File file2.txt
但了解您使用的是 .txt 文件、.csv、.xml 还是其他类型的文件会很有用。
推荐阅读
- javascript - 对象上的映射给出了预期的错误标识符。ts(1003) 使用密钥时
- r - 如何从浏览器导入excel文件
- wordpress - 显示与自定义帖子 wordpress 的标题相同的标签
- sql - 需要为 SQL SERVER 字符串值添加双引号
- php - php imap_open 临时 IMAP 连接与 localhost dovecot 断开
- php - Laravel 数据库模式设置为复选框?
- python - numpy 中的自定义 dtype 用于纬度,经度用于更快的距离矩阵/克里金法/IDW 插值计算
- flutter - 我需要做什么才能使用我的按钮小部件链接到另一个文件?
- powershell - VSCode 突然默认使用 powershell 来集成终端和任务
- python - 如何用 20 点(晚上 8 点)到 12 点(上午)的轴绘制夜间时间 python