blob: 60873dac159cd271944ef38d5c303d8d19fc3c0d [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
10find -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
17done