File: find_stray_common_vars

package info (click to toggle)
busybox 1%3A1.30.1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 26,768 kB
  • sloc: ansic: 182,637; sh: 8,979; cpp: 1,428; makefile: 1,023; yacc: 570; lex: 355; perl: 312; python: 109; awk: 29
file content (10 lines) | stat: -rwxr-xr-x 316 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

# Common variables are elusive, they don't show up in size output!
# This script will show all commons in *.o, sorted by size

find ! -path './scripts/*' -a ! -name built-in.o -a -name '*.o' \
| while read name; do
    b=`basename "$name"`
    nm "$name" | sed "s/^/$b: /"
done | grep -i ' c ' | sort -k2