aboutsummaryrefslogtreecommitdiff
path: root/gspell
blob: 5edb8e48cf4b7033254ee315c9461f31dfb8f910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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 }'
rm $f
rm $g 2>/dev/null