aboutsummaryrefslogtreecommitdiff
path: root/gspell
blob: e931f3c89a7eaafc90c3a9cf0541050766855a1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# gspell -- print locations of spelling errors in file

f=`mktemp`
if [ $# -eq 0 ]; then
	g=`mktemp`
	cat > $g
	set -- $g
fi

spell "$@" > $f
fgrep -Hnof $f "$@" |
awk -F: 'NF > 2 { print $0; prefix = $1 ":" $2 ":"; next } { print prefix $0 }'
s=$?
rm $f
rm $g 2>/dev/null
exit $s