Denys Vlasenko | 0f89605 | 2010-07-26 01:35:44 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | grep -n -B1 -r $'^\t*}$' . | grep -A1 '.[ch]-[0-9]*-$' |
| 4 | grep -n -A1 -r $'^\t*{$' . | grep -B1 '.[ch]-[0-9]*-$' |
| 5 | # or (less surefire ones): |
| 6 | grep -n -B1 -r $'^\t*}' . | grep -A1 '.[ch]-[0-9]*-$' |
| 7 | grep -n -A1 -r $'^\t*{' . | grep -B1 '.[ch]-[0-9]*-$' |
Denys Vlasenko | ba2dccc | 2010-07-26 01:49:12 +0200 | [diff] [blame^] | 8 | |
| 9 | # find trailing empty lines |
| 10 | find -type f | xargs tail -1 | while read file; do |
| 11 | test x"$file" = x"" && continue |
| 12 | read lastline |
| 13 | #echo "|$file|$lastline" |
| 14 | if test x"$lastline" = x""; then |
| 15 | echo "$file" |
| 16 | fi |
| 17 | done |