On 14.10.2012 22:51, Michael Biebl wrote: > Some numbers: > a/ # of initscripts: 1192 (+3 symlinks) > $ find . -type f | wc -l > 1192 > > b/ # of initscripts with a Usage line (I additionally check for start to > limit false positives) > $ grep -vE "^\s*#.*" */*/* | grep "[Uu]sage.*start*" | wc -l > 1153 > > c/ # of initscripts matching '|reload[|}"]': > grep -vE "^\s*#.*" */*/* | grep '[Uu]sage.*|reload[|}"]' | wc -l > 351 > > d/ # checking for '[{|]reload[|}"]' doesn't produce additional hits: > grep -vE "^\s*#.*" */*/* | grep '[Uu]sage.*[{|]reload[|}"]' | wc -l > 351 > > e/ # of initscripts matching '[^-]reload[^-]' > grep -vE "^\s*#.*" */*/* | grep '[Uu]sage.*[^-]reload[^-]' | wc -l > 352 > > the additional hit compared to c/ is > am-utils_6.2+rc20110530-3/init.d/am-utils: echo "Usage: /etc/init.d/amd > {start|stop|restart|[force-]reload}" > > > f/ # of Usage lines using continuations: > $ grep -vE "^\s*#.*" */*/* | grep '[Uu]sage.*\\$' | wc -l > 10
g/ filter duplicates $ grep -vE "^\s*#.*" */*/* | grep '[Uu]sage.*|reload[|}"]' | sort | wc -l 351 $ grep -vE "^\s*#.*" */*/* | grep '[Uu]sage.*|reload[|}"]' | sort -u | wc -l 350 The one init script using two Usage lines is udev. But our udev init script is "special", so I wouldn't worry about that. All in all I think this should work pretty well, expecially if we also address f/. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature