使用findstr批处理的返回值

时间:2016-07-14 12:38:59

标签: batch-file svn findstr

我有脚本:

svn log --incremental -l 1 -r 384092 -v http://svn/someFolder/ | findstr "ws/wsjava" | findstr /C:"   D"

我获取指定修订版本384092的svnlog,并检查是否存在包含ws/wsjava D的字符串。我怎么能用它呢? - 如果从findstr返回一些字符串 - 调用其他批处理。

2 个答案:

答案 0 :(得分:2)

改为使用dataSource: { aggregate: [{ field: "description", aggregate: "sum" }, { field: "balance1", aggregate: "sum" }, { field: "balance2", aggregate: "sum" }, { field: "balance3", aggregate: "sum" }, { field: "balance4", aggregate: "sum" }, { field: "balance5", aggregate: "sum" }, { field: "balance6", aggregate: "sum" }, { field: "balance7", aggregate: "sum" }] }, svn log --search foo

阅读svn log command reference in SVNBook

答案 1 :(得分:0)

svn log --incremental -l 1 -r 384092 -v http://svn/someFolder/ | findstr "ws/wsjava" | findstr /C:" D" && call otherbatch.bat 

Thanx rojo。