从txt文件中删除前两行 [英] Delete first two lines from txt files

查看:173
本文介绍了从txt文件中删除前两行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从非常大量的txt文件(大约10.000)删除前两行。我正在寻找一种方法来做到这一点从命令行或通过另一个半自动过程。每个文件都不同于其他文件,但它们都包含我需要删除的前两行的一些信息。

解决方案

  for(* .txt)do(
more +2<%%〜fa> 2linesskipped.txt
move / y没有外部工具的2linesskipped.txt%%〜fa

>

I need to delete the first two lines from a very large amount of txt files (about 10.000). I'm looking for a way to do this from the command line or through another semi-automatic procedure. Every file is different from the other, but they all contain some information on the first two lines that I need to get rid of.

解决方案

for %%a in (*.txt) do (
  more +2 <  "%%~fa" > 2linesskipped.txt
  move /y 2linesskipped.txt "%%~fa"
)

without external tools.

这篇关于从txt文件中删除前两行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆