sed "/div.*2007-09-24./!d" test.txt|more>>1.txt
用sed在 test.txt中查找含有div和2007-09-24的行到1.txt
问题是将下面
set d=%date%
call set d=%%d:~0,10%%
的%d%传给sed中 “2007-09-24”
sed "/div.*%d%./!d" test.txt|more>>1.txt
得到类似以上的格式
谢谢!
[ Last edited by junchen2 on 2007-9-24 at 09:46 PM ]作者: lxmxn 时间: 2007-9-24 22:21