Skip to content

Instantly share code, notes, and snippets.

@MachinesAreUs
Created February 22, 2012 17:27
Show Gist options
  • Save MachinesAreUs/1886189 to your computer and use it in GitHub Desktop.
Save MachinesAreUs/1886189 to your computer and use it in GitHub Desktop.
4 software archaeologists: Find all solutions/projects in a .Net repository
find . -name '*.sln' > solutions.txt
while read line; do
name=`basename "$line"`;
grep '^Project.*\.csproj' "$line" |
awk -F'=' '{print $2}' |
awk -F',' -v sln="$name" '{print sln "," $1 "," $2}' ;
done < solutions.txt > solutionsAndProjects.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment