sunwind2014的个人博客分享 http://blog.sciencenet.cn/u/sunwind2014

博文

从某一文件中读取含有某一字符行的bat脚本

已有 3810 次阅读 2017-8-3 17:07 |系统分类:科研笔记

从某一文件中读取含有某一字符行时,可以用find命令。下面是自写的一个小脚本供大家参考。

dir /a-d /b *.17S >QQ.txt

@echo off & setlocal EnableDelayedExpansion


set j=0


for /f "delims=""" %%i in (QQ.txt) do (


set /a j+=1


set con!j!=%%i


call set a=%%con!j!%%

echo !a!

find /i "SUM 17" !a! >>1.TXT

)

pause




https://blog.sciencenet.cn/blog-2473572-1069378.html

上一篇:windows下实现teqc批处理的bat脚本
下一篇:基于opensuse42.1的GAMIT10.6的安装
收藏 IP: 36.102.228.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-8 04:45

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部