From 94b6dc4d4d842cab6e6e96da5a407286d68d749a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 18 Jun 2021 22:28:11 +0200 Subject: Add 'gspell' utility --- gspell | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 gspell diff --git a/gspell b/gspell new file mode 100755 index 0000000..5edb8e4 --- /dev/null +++ b/gspell @@ -0,0 +1,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 -- cgit v1.2.3