~/bin/sp
#25
- Author
- winny
- Created
- Sept. 4, 2020, 3:30 p.m.
- Expires
- Never
- Size
- 230 bytes
- Hits
- 695
- Syntax
- Bash
- Private
- ✗ No
#!/bin/sh
# Simple spell checker. Usage: sp the words to check
set -eu
echo "$@" | aspell -a | awk '
match($0, /^& (.*) [0-9]+ [0-9+]: (.*)/, ary) {
printf("%s: %s\n", ary[1], ary[2]);
code=1;
}
END {
exit(code);
}
'