blob: aae18f99b1ae08ca70459cd14b14d8a134ce2d20 [file] [log] [blame]
Denys Vlasenko0f896052010-07-26 01:35:44 +02001#!/bin/sh
2
3grep -n -B1 -r $'^\t*}$' . | grep -A1 '.[ch]-[0-9]*-$'
4grep -n -A1 -r $'^\t*{$' . | grep -B1 '.[ch]-[0-9]*-$'
5# or (less surefire ones):
6grep -n -B1 -r $'^\t*}' . | grep -A1 '.[ch]-[0-9]*-$'
7grep -n -A1 -r $'^\t*{' . | grep -B1 '.[ch]-[0-9]*-$'
Denys Vlasenkoba2dccc2010-07-26 01:49:12 +02008
9# find trailing empty lines
Bernhard Reutner-Fischer3d615b82010-07-28 21:29:19 +020010find -type f | while read file; do
Denys Vlasenkoba2dccc2010-07-26 01:49:12 +020011 test x"$file" = x"" && continue
Bernhard Reutner-Fischer3d615b82010-07-28 21:29:19 +020012 tail -n1 $file | while read lastline
13 do
14 #echo "|$file|$lastline"
15 if test x"$lastline" = x""; then
Denys Vlasenkoba2dccc2010-07-26 01:49:12 +020016 echo "$file"
Bernhard Reutner-Fischer3d615b82010-07-28 21:29:19 +020017 fi
18 done
Denys Vlasenkoba2dccc2010-07-26 01:49:12 +020019done