我在一个文本文件中有一个目录名列表。我想将它们用作 git-svn clone 命令的 file_name 的一部分。
这将逐行打印出文件的内容。
cat repos_to_migrate.txt | tee $1
但这不起作用:
cat repos_to_migrate.txt | git svn clone file:///home/svn/$1
... Unable to open repository 'file:///home/svn' ...
这里有什么想法吗?我运行的是 centos5 很重要。
最佳答案
(
while read repo; do
git svn clone file:///home/svn/$repo
done
) < repos_to_migrate.txt
关于linux - unix管道命令的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4622835/