Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3

Carlo Wood
2007-06-15T18:01:57Z

This was actually a part of a larger reply - but I decided not to sent
that. Didn't want to throw away the work I did to get accurate numbers
though ;)

I investigated:

find -name "*.c" | wc --lines
11100
find -name "*.c" | xargs egrep "(version 2.*([Ll]icense|redistribute|released|GNU|GPL|any later version|Foundation))|(([Ll]icense|redistribute|released|GNU|GPL|any later version|Foundation).*version 2)" | sed -e 's/:.*//' | sort -u | wc --lines
4042
find -name "*.c" | xargs egrep "(version 2.*([Ll]icense|redistribute|released|GNU|GPL|any later version|Foundation))|(([Ll]icense|redistribute|released|GNU|GPL|any later version|Foundation).*version 2)" | egrep -v '(either version 2(\.[0-9])*|version 2(\.[0-9])*( of the License)*,* or)' | sed -e 's/:.*//' | sort -u | wc --lines
1377
find -name "*.c" | xargs egrep "(version 2.*([Ll]icense|redistribute|released|GNU|GPL|any later version|Foundation))|(([Ll]icense|redistribute|released|GNU|GPL|any later version|Foundation).*version 2)" | egrep -v '(either version 2(\.[0-9])*|version 2(\.[0-9])*( of the License)*,* or)' | sed -e 's/:.*//' | sort -u | xargs grep 'any later version' | wc --lines
4

Hence there are 1377 - 4 = 1373 .c files that explicitely say 'version 2',
and 4042 - 1373 = 2669 .c files that say 'version 2 or later'.
There are 11100 - 1373 - 2669 = 7058 files that do not say anything.