联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
AAA BBB CCC
findstr /g:sed.ini YourFileToSearch
@echo off&setlocal EnableDelayedExpansion set xs=0 set "var=sed -e "{s/aaa//;s/bbb//;s/ccc//g}" a.txt" for /f "tokens=1* delims=:" %%a in ('findstr /n .* a.txt') do set num%%a=%%b for /f "delims=" %%a in ('%var%') do ( set /a str+=1 call set uew=%%num!str!%% if "!uew!"=="%%a" set /a xs=1 ) echo 共有 !xs! 行含有指定字符. pause
Originally posted by lxmxn at 2007-10-16 23:26: 下面放搜索的字串 sed.ini:findstr /g:sed.ini YourFileToSearch
Originally posted by 26933062 at 2007-10-16 23:55: [code] @echo off&setlocal EnableDelayedExpansion set xs=0 set "var=sed -e "{s/aaa//;s/bbb//;s/ccc//g}" a.txt" for /f "tokens=1* delims=:" %%a in ('findstr /n . ...
Originally posted by zerocq at 2007-10-17 00:27: sed.ini只放一行内容有效 多行无效??
G:\>type sed.ini perl sed first G:\>type test.txt this is a perl test something to use sed www.cn-dos.net/forum my first important filter is the Great GNU sed javascript G:\>findstr /g:sed.ini test.txt this is a perl test something to use sed my first important filter is the Great GNU sed G:\>