列出svn信息库中的目录条目? [英] list directory entries in the svn repository?

查看:107
本文介绍了列出svn信息库中的目录条目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何编写bash脚本以列出svn存储库中的目录条目? 我想编写bash文件,因为我有大量的存储库.

How can I write a bash script to list directory entries in the svn repository? I want to write bash file because i have a large number of repositories.

推荐答案

如果您是Subversion管理员,则以下命令将返回存储库中的目录.

If you are the subversion administrator, the following command will return the directories located in your repository.

svnlook tree $REPO_DIR --full-paths | egrep "/$"

窍门是grep命令,该命令正在名称中查找结尾的"/"字符

The trick is the grep command that is looking for a trailing "/" character in the name

同样的技巧也适用于svn命令

Same trick works for the svn command as well

svn list $REPO_URL -R | egrep "/$"

额外笔记

要重复运行此命令,可以将其放入shell进行循环

Extra notes

To repeatedly run this command you can put it into a shell for loop

for url in $URL1 $URL2 $URL2
do
svn list $url -R | egrep "/$"
done

这篇关于列出svn信息库中的目录条目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆