busybox/scripts/find_stray_communal_vars
Denis Vlasenko 74324c8666 Audit bb_common_bufsiz usage, add script which looks for misuse.
tr: stop using globals needlessly.
code: -103 bytes
2007-06-04 10:16:52 +00:00

11 lines
273 B
Bash
Executable File

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