find_stray_common_vars 269 B

12345678910
  1. #!/bin/sh
  2. # Common variables are elusive, they don't show up in size output!
  3. # This script will show all commons in *.o, sorted by size
  4. find -name '*.o' \
  5. | while read name; do
  6. b=`basename "$name"`
  7. nm "$name" | sed "s/^/$b: /"
  8. done | grep -i ' c ' | sort -k2