中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 求助批处理删除擀定字符开始行之前的所有行
作者:
标题: 求助批处理删除擀定字符开始行之前的所有行 上一主题 | 下一主题
exonjee
新手上路





积分 5
发帖 5
注册 2009-6-9
状态 离线
『楼 主』:  求助批处理删除擀定字符开始行之前的所有行

请看下面的txt文本内容,需要处理的数据是删除红色字体前的所有行数据。请教高手。谢谢!!
FileID,,"WEI MIN Data File"
FileName,,"1CRBCAH9329D03-200.#090401210252#.CSV"
TestTime,,"09-04-01 21:02:52"
TesterModel,,"LED617WH"
CommPort,,"COM10:"
TesterNumber,,"LED617WH_081117205623"
ProductName,,"1CRBCAH9329D03-200"
DeviceNumber,,"快速片档"
Specification,,"_TESTER_NO.00_02"
SampleBins,,"ALL"
SampleStandard,,"WEIMIN"
SampleLevel,,"STANDARD"
TotalTested,,"30000"
Samples,,"30000"
Operator,,"A090330C"
Temperature,,"B12D"
MaximumBin,,"31"
ItemName,,"FFINAL(V),RFINAL(V),FESD(V),RESD(V),BIN,CONTA,CONTC,POLAR,VF1(V),VF2(V),VF3(V),VF4(V),VFM1(V),VFM2(V),DVF(V),VF(V),VFD(V),VZ1(V),VZ2(V),IR(uA),LOP1,LOP2,LOP3,WLP1(nm),WLD1(nm),WLC1(nm),HW1(nm),PURITY1,X1,Y1,Z1,CCT1,ST1,INT1,WLP2(nm),WLD2(nm),WLC2(nm),HW2(nm),PURITY2,X2,Y2,Z2,CCT2,ST2,INT2,WLP3(nm),WLD3(nm),WLC3(nm),HW3(nm),PURITY3,X3,Y3,Z3,CCT3,ST3,INT3,PosX,PosY"
DataFormat,,"0,0,0,0,0,0.00,0.00,0,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.0,0.0,,,,,0.0,0.0,0.0,0.0,0.000,0.0000,0.0000,0.0000,0,0,0,0.0,0.0,0.0,0.0,0.000,0.0000,0.0000,0.0000,0,0,0,0.0,0.0,0.0,0.0,0.000,0.0000,0.0000,0.0000,0,0,0,,"
TestCondition,,"FFINAL(V),RFINAL(V),FESD(V),RESD(V),BIN,,,,IF1(mA),IF2(mA),IF3(mA),IF4(mA),IFM1(mA),IFM2(mA),IFP*T,,,IZ1(uA),IZ2(uA),VR(V),IF(mA),IF(mA),IF(mA),IF(mA),IF(mA),IF(mA),,,,,,IF(mA),IF(mA),IF(mA),IF(mA),IF(mA),IF(mA),,,,,,IF(mA),IF(mA),IF(mA),IF(mA),IF(mA),IF(mA),,,,,,IF(mA),IF(mA),IF(mA),,"
At,,",,,,ALL,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt1,,",,,,1,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt2,,",,,,2,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt3,,",,,,3,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt4,,",,,,4,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt5,,",,,,5,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt6,,",,,,6,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt7,,",,,,7,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt8,,",,,,8,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt9,,",,,,9,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt10,,",,,,10,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt11,,",,,,11,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt12,,",,,,12,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt13,,",,,,13,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt14,,",,,,14,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt15,,",,,,15,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt16,,",,,,16,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt17,,",,,,17,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt18,,",,,,18,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt19,,",,,,19,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt20,,",,,,20,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt21,,",,,,21,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt22,,",,,,22,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt23,,",,,,23,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt24,,",,,,24,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt25,,",,,,25,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt26,,",,,,26,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@8,@20,@5,@0,@20,@20,@20,,,,,,@20,@20,@20,@5,@5,@5,,,,,,@5,@5,@5,@0,@0,@0,,,,,,@0,@0,@0,,"
BinAt27,,",,,,27,,,,@20,@5,@.01,@.001,@0,@0,@0*0,,,@10,@0,@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800,0,400,1,,,2,3.135,2.83,2.326,2.158,,,,2.408,.047,49.9,,0,92.02,30.8,,464.8,469,,22.4,.98,.1321,.0564,.8115,,15,4354,467.5,470.3,,19.5,.983,.1265,.0643,.8092,,15,1175,,,,,,,,,,,,10,-3
2,0,800,0,400,1,,,2,3.139,2.829,2.32,2.056,,,,2.409,.041,45.5,,0,99.73,33.41,,465.2,469.5,,22.5,.979,.131,.0587,.8103,,15,4493,468.2,470.9,,19.6,.982,.1252,.0672,.8076,,15,1229,,,,,,,,,,,,9,-3
3,0,800,0,400,1,,,2,3.146,2.833,2.332,2.175,,,,2.412,.047,33.2,,.019,102,34.14,,465.4,469.6,,23,.979,.1307,.0594,.8099,,15,4503,468.3,471,,19.3,.981,.1248,.0684,.8068,,15,1240,,,,,,,,,,,,8,-3
4,0,800,0,400,1,,,2,3.147,2.834,2.332,2.077,,,,2.414,.041,47.1,,.031,103.9,35.03,,465.4,469.6,,23,.979,.1307,.0594,.8099,,15,4599,468.1,470.9,,19.6,.982,.125,.0677,.8073,,15,1265,,,,,,,,,,,,7,-3
5,0,800,0,400,1,,,2,3.137,2.832,2.328,2.188,,,,2.41,.05,42.3,,.013,99.74,33.82,,465.1,469.4,,23,.979,.1313,.0582,.8105,,15,4604,467.8,470.7,,19.6,.982,.1256,.0665,.8079,,15,1273,,,,,,,,,,,,6,-3


2009-6-9 23:01
查看资料  发短消息 网志   编辑帖子  回复  引用回复
ccwan
金牌会员




积分 2725
发帖 1160
注册 2006-9-23
来自 河北廊坊
状态 离线
『第 2 楼』:  

sed /TEST,/,$d 1.txt

   此帖被 +2 点积分    点击查看详情   
评分人:【 Hanyeguxing 分数: +2  时间:2009-6-9 23:41




三人行,必有吾师焉。   学然后知不足,教然后知困,然后能自强也。
2009-6-9 23:40
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
ccwan
金牌会员




积分 2725
发帖 1160
注册 2006-9-23
来自 河北廊坊
状态 离线
『第 3 楼』:  

惭愧,楼主要的是保留红字部分。我的代码弄反了。改成sed /TEST,/,$!d 1.txt



三人行,必有吾师焉。   学然后知不足,教然后知困,然后能自强也。
2009-6-10 00:01
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
exonjee
新手上路





积分 5
发帖 5
注册 2009-6-9
状态 离线
『第 4 楼』:  

试过不行

2009-6-10 01:59
查看资料  发短消息 网志   编辑帖子  回复  引用回复
exonjee
新手上路





积分 5
发帖 5
注册 2009-6-9
状态 离线
『第 5 楼』:  



  Quote:
Originally posted by ccwan at 2009-6-10 00:01:
惭愧,楼主要的是保留红字部分。我的代码弄反了。改成sed /TEST,/,$!d 1.txt

CMD没有这个命令,试过没有什么反应

您的代码怎么操作,

[ Last edited by exonjee on 2009-6-10 at 02:09 ]

2009-6-10 02:01
查看资料  发短消息 网志   编辑帖子  回复  引用回复
Hanyeguxing
银牌会员

正在学习中的菜鸟...


积分 1039
发帖 897
注册 2009-3-1
来自 在地狱中仰望天堂
状态 离线
『第 6 楼』:  

sed 是第三方命令程序

下载地址
http://www.cn-dos.net/forum/view ... mp;page=2#pid201020
里的17楼



批处理之家 http://bbs.bathome.net/forum-5-1.html
2009-6-10 02:06
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
ccwan
金牌会员




积分 2725
发帖 1160
注册 2006-9-23
来自 河北廊坊
状态 离线
『第 7 楼』:  

运行该代码,要确保你有sed.exe,并把1.txt改成你那个文件的名称。
sed.exe可到http://www.cn-dos.net/forum/viewthread.php?tid=25914&fpage=1下载。



三人行,必有吾师焉。   学然后知不足,教然后知困,然后能自强也。
2009-6-10 02:09
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
exonjee
新手上路





积分 5
发帖 5
注册 2009-6-9
状态 离线
『第 8 楼』:  

试下先,谢谢

2009-6-10 02:13
查看资料  发短消息 网志   编辑帖子  回复  引用回复
yishanju
银牌会员

[b]看你妹啊[/b]


积分 1488
发帖 1357
注册 2006-5-20
状态 离线
『第 9 楼』:  

fr -rnnlic:".*(TEST,FFINAL,RFINAL,.*)" -t:"\1" aa.txt




有问题请发论坛或者自行搜索,再短消息问我的统统是SB
2009-6-10 02:20
查看资料  发短消息 网志   编辑帖子  回复  引用回复
yishanju
银牌会员

[b]看你妹啊[/b]


积分 1488
发帖 1357
注册 2006-5-20
状态 离线
『第 10 楼』:  

FR 下载http://baiy.cn/utils/fr/index.htm




有问题请发论坛或者自行搜索,再短消息问我的统统是SB
2009-6-10 02:21
查看资料  发短消息 网志   编辑帖子  回复  引用回复
exonjee
新手上路





积分 5
发帖 5
注册 2009-6-9
状态 离线
『第 11 楼』:  

可以了,谢谢大家

2009-6-10 02:32
查看资料  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: