【发布时间】:2016-04-20 12:39:17
【问题描述】:
有人可以帮我编写这个批处理脚本吗?
我需要运行以下命令 svn info 并获取变量中的某些详细信息。
Path: .
Working Copy Root Path: C:\Users\jslevin\Desktop\SQL
URL: https://ofss220383.in.oracle.com:18080/svn/SVN_DEMO/branches/FCUBS_TEST/Soft/AM/SQL
Relative URL: ^/branches/FCUBS_TEST/Soft/AM/SQL
Repository Root: https://ofss220383.in.oracle.com:18080/svn/SVN_DEMO
Repository UUID: 866b0b85-a196-4771-a359-d37e344426b2
Revision: 47
Node Kind: directory
Schedule: normal
Last Changed Author: john.levin@oracle.com
Last Changed Rev: 47
Last Changed Date: 2016-04-11 18:01:56 +0530 (Mon, 11 Apr 2016)
Var1 = SVN_DEMO (This variable should hold the Repository Root: line and should get the Last word i.e., SVN_DEMO)
Var2 = FCUBS_TEST (Should grep URL: and hold the word after branches alone i.e., FCUBS_TEST)
我正在我的脚本中创建一些临时文件。在脚本结束时,我需要找到任何可用的文件并删除它。
【问题讨论】:
-
批处理脚本在哪里,您需要帮助吗?
-
@Stephan,我使用 awk、grep 在 shell 中实现我的目标,但想知道如何批量使用 findstr 和 grep 来实现我的结果。任何想法表示赞赏。
标签: windows batch-file batch-processing