China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 23:58
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to delete specified characters from text (there are tens of thousands of txt files)???? View 952 Replies 7
Original Poster Posted 2009-12-23 10:29 ·  中国 广东 阳江 电信
新手上路
Credits 16
Posts 14
Joined 2006-06-23 05:58
20-year member
UID 57436
Status Offline
The purple Baoyan Jiqing Shendan is the second divine pill among the seven Jidan; the first one is the red divine pill.

Li Qiang casually took out the purple divine pill and swallowed it in one gulp. He did not think much about it, only hoping he could hold on a little longer, and at best keep the Pofan Jue great restriction going until the small planet fragments were completely broken open. (Qidian Literature Website,www.qidian.com)

After swallowing the Qiji Dan, Li Qiang unexpectedly felt nothing at all. About a minute later, a purple radiance burst out from the top of his head and circled around beside it.

His divine power was finally exhausted, the Jinzun divine heart also stopped beating, and because Pofan Jue could no longer obtain replenishment of divine power, it dissipated with a bang.www.aaa.com

There are tens of thousands of txt files in the folder. What's the fastest way to delete “(Qidian Literature Website,www.qidian.com)” and “www.aaa.com” from the text?
Is software faster or is a batch file faster?? What software???
Experts, please give me some pointers, thanks...
Floor 2 Posted 2009-12-23 13:35 ·  中国 广西 南宁 电信
初级用户
★★
Credits 99
Posts 53
Joined 2006-08-18 18:44
19-year member
UID 60809
Status Offline
www.aaa.comThis website isn't a real one, right
Floor 3 Posted 2009-12-23 18:01 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
Just use a command like FR or SED to find and replace it with nothing.

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 4 Posted 2009-12-23 19:16 ·  中国 广东 阳江 电信
新手上路
Credits 16
Posts 14
Joined 2006-06-23 05:58
20-year member
UID 57436
Status Offline
How do you use SED? How do you delete specified characters from text and replace them with nothing?
Floor 5 Posted 2009-12-25 00:43 ·  中国 北京 阿里云BGP服务器
银牌会员
★★★
永远的菜鸟
Credits 1,335
Posts 574
Joined 2007-11-27 12:50
18-year member
UID 103929
Gender Male
From 广西
Status Offline
fr *.txt /r:"www.*com" /t:""

Click here to download fr.exe
Floor 6 Posted 2009-12-25 01:09 ·  中国 广东 阳江 电信
新手上路
Credits 16
Posts 14
Joined 2006-06-23 05:58
20-year member
UID 57436
Status Offline
Thanks~~~~~
Floor 7 Posted 2009-12-25 04:26 ·  中国 台湾 台湾宽频通讯顾问股份有限公司
初级用户
★★
Credits 68
Posts 64
Joined 2009-05-23 20:43
17-year member
UID 145803
Gender Male
Status Offline
Bump
Floor 8 Posted 2009-12-25 10:53 ·  中国 北京 阿里云BGP服务器
银牌会员
★★★
永远的菜鸟
Credits 1,335
Posts 574
Joined 2007-11-27 12:50
18-year member
UID 103929
Gender Male
From 广西
Status Offline
The code in reply #5 has a bit of a problem: if there are two identical fields in one line (paragraph), it will go wrong (because of greedy matching). The code below is a bit better... it's recommended to first make a temporary directory and test it with a small number of files
fr *.txt /r:"www\.*\.com" /t:""
Forum Jump: