[英]Bash script for few commands
Now we have a command which_repo address/to/file.js
which detect what svn
repo is used for the file and display answer on the screen. 现在我们有一个命令
which_repo address/to/file.js
,它检测svn
repo用于文件并在屏幕上显示答案。 It looks like: 看起来像:
myrepo/address/to/file.js
after that I should type svn blame cvs/myrepo/address/to/file
. 之后我应该输入
svn blame cvs/myrepo/address/to/file
。 End of the string I'm copying from the which_repo
answer. 我正在从
which_repo
答案复制的字符串的which_repo
。
How to write the function which will perform this in a step, something like: 如何编写将在一个步骤中执行此操作的函数,如:
blame address/to/file.js
Create a script blame
: 创建脚本
blame
:
#!/bin/bash
svn blame "cvs/$(which_repo "$1")"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.