Benbob
Benbob

Reputation: 14264

Problem with unix pipe command

I have a list of directory names in a text file. I want to use these as part of a file_name a git-svn clone command.

This prints out the contents of the file line by line.

cat repos_to_migrate.txt | tee $1

This however does not work:

cat repos_to_migrate.txt | git svn clone file:///home/svn/$1
... Unable to open repository 'file:///home/svn' ...

Any ideas here? I'f it matters I'm running centos5.

Upvotes: 1

Views: 290

Answers (1)

cdhowie
cdhowie

Reputation: 169318

(
    while read repo; do
        git svn clone file:///home/svn/$repo
    done
) < repos_to_migrate.txt

Upvotes: 1

Related Questions