PTT
Submit
Submit
选择语言
正體中文
简体中文
PTT
CodeJob
[发案] DOS档案字串处理(已结案)
楼主:
dearaquarius
(乱青春)
2016-07-20 14:22:56
凡是“*[30m”开始的行,都请使用 Ctrl + y 删除。
如果对于发案文章格式有不清楚的地方,请参考置底文章:[发案] 发案范例
发案人:吴先生
联络方式1:Line:dearaquarius
联络方式2:站内信
所在地区 :桃园
有效时间:7/24
专案说明:
功能a. 搜寻字串出现次数 并设定参数 set Str_Count=QTY
功能b. 将搜寻字串内容做替换 (若有重复可指定第几个 无指定则全部替换)
功能c. 将搜寻字串后的内容 并指定byte做替换
功能d. 将搜寻字串后的内容 指定byte设定成参数 set Str_par=Parameter
功能e. 算术计算 加减乘除, 开根号
功能f. 指定行数 删除/插入 内容
功能G. 指定位置 删除/插入 内容
Ex:
File name Test.txt
======================================
apple:12345
beer
cat
dog
apple:45678
beer
cat
apple:13579
======================================
a. 执行 FileTool /sq Test.txt "apple"
echo %Str_Count%
结果 3
b. 执行 FileTool /r Test.txt Test2.txt "apple" "APPLE"
Type Test2.txt
结果
APPLE:12345
beer
cat
dog
APPLE:45678
beer
cat
APPLE:13579
c. 执行 FileTool /rb 2-3 Test.txt Test2.txt 3 "apple:" 246810
Type Test2.txt
结果
apple:12345
beer
cat
dog
apple:45678
beer
cat
apple:124681079
d. 执行 FileTool /par 2-3 Test.txt 3 "apple:"
echo %Str_par%
结果 35
e. 执行 FileTool /cal "(123+15/5)*2"
echo %Str_Cal%
结果 63
f. 执行 FileTool /del_row 3 Test.txt Test2.txt
Type Test2.txt
结果
apple:12345
beer
dog
apple:45678
beer
cat
apple:246810
执行 FileTool /ins_row 3 Test.txt Test2.txt "ZooZooZoo"
Type Test2.txt
结果
apple:12345
beer
ZooZooZoo
dog
apple:45678
beer
cat
apple:246810
g. 执行 FileTool /del_pos 3-8 Test.txt Test2.txt
Type Test2.txt
结果
ap345
beer
dog
apple:45678
beer
cat
apple:246810
执行 FileTool /ins_pos 3 Test.txt Test2.txt "ZooZooZoo"
Type Test2.txt
结果
apZooZooZoople:12345
beer
ZooZooZoo
dog
apple:45678
beer
cat
apple:246810
预算:口袋不深 请报价
接案者要求:
附注:
作者:
p2k
(pank)
2016-07-20 23:00:00
环境是纯 DOS 还是 Windows 下的 CMD 视窗?
作者:
shadowjohn
(转角遇到爱)
2016-07-20 23:44:00
http://3wa.tw/myimage/index.php?id=147
这样吗?e 的执行结果应该为 252 请确认一下 ?已完成~可跟我联络XD花了2小时…前半部研究env真搞工
继续阅读
征订房系统云端工程师
marisa6420
[发案] 求爬虫高手
mirasol0524
[发案] 外包Android app(已征得 谢谢)
shantelly
[发案] 程式 (已征得 谢谢大家!!)
ting126
[发案] 类似google sheet的线上excel
to1322
[发案] 软件改良 (须会Python,OpenGL,QT)
RickyKckao
[发案] 使用MATLAB找出系统模型的最佳化之解
frank1992126
[发案] 资结作业C or C++ (已征到)
oldmove
[个人] excel VBA
shawoh
[发案] 古亭征短期C#.NET MVC 工程师
windeya
Links
booklink
Contact Us: admin [ a t ] ucptt.com