i'm learning bash on linux, i found script for "while loop reading from a file" and modified a bit as below, i 'm trying to read a list file containing all the git repos, and i wanted to iterate all those git repos and run
git status for all of them:
while read line; do echo $line; cd $line; git status; done < repo.list
this part works fine, i can see status of each repo in stdout, but when i tried to write output to another file, it doesn't work:
while read line; do echo $line; cd $line; git status; done < repo.list > status.txt
how can i consolidate all
git status output and write to a file? thanks!