I have a text file with a list of Mercurial repositories in it, in the form:
IDE
Install
InstallShield
I'm writing a bash script to clone/pull/update all the repositories based on the text file. Right now I'm just echoing before I do any actual cloning. If I do:
while read line; do
echo "hg clone" ${MASTER_HG}/${line};
done < Repos.txt
The output is as expected:
hg clone /media/fs02/IDE
hg clone /media/fs02/Install
hg clone /media/fs02/InstallShield
However, if I do:
while read line; do
echo "hg clone" ${MASTER_HG}/${line} ${REPOROOT}/${line};
done < Repos.txt
The output is:
/var/hg/repos/IDE02/IDE
/var/hg/repos/Installnstall
/var/hg/repos/InstallShieldShield
It seems to be replacing the beginning of the string with the end of the string. Is there some kind of character overflow or something going on? My apologies if this is a dumb question, but I'm a relative noob for bash.