svn - 使用 'svn mv' 在 bash 中将目录中的每个文件大写

标签 svn shell file batch-file rename

我需要更改 subversion 工作副本中一组文件的大小写,如下所示:

svn mv test.txt 测试.txt
svn mv test2.txt Test2.txt
svn mv testn.txt Testn.txt
...
svn commit -m "caps"

我怎样才能自动化这个过程?提供标准的 linux 安装工具。

最佳答案

ls | awk '{system("svn mv "$0 ""toupper(substr($0,1,1)) substr($0,2))}'

显然,其他脚本语言也能正常工作。 awk 的优势在于它无处不在。

关于svn - 使用 'svn mv' 在 bash 中将目录中的每个文件大写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/199469/

相关文章:

html - 在 html 文件中寻找 <table>

java - 为什么我无法使用 RestTemplate 将文件发送或 POST 到服务器?

svn - 如何强制Subversion提交过时的文件?

linux - SVN 用另一个替换分支 - 不合并

mysql - 使用shell脚本访问mysql

bash - [-d : command not found

C shell 程序中从 system() 更改为 execvp()

android - FileOutputStream 什么也不做(Android Studio)

svn - 从其他存储库收集更改时构建失败

svn - 是否可以在不更改工作副本的情况下撤消 SVN 提交?