A spell checker is an applications program that flags words in a document that may not be spelled correctly. Spell checkers may be stand-alone capable of operating on a block of text, or as part of a larger application, such as a word processor, email client, electronic dictionary, or search engine.

Ispell is a spelling checker for Unix that supports most Western languages. It offers several interfaces, including a programmatic interface for use by editors such as emacs. You can use any other spell program available under your UNIX operating system such as aspell.

aspell is a free software spell checker designed to replace Ispell. It is the standard spell checker for the GNU software system. Dictionaries for it are available for about 70 languages. Set SPELL path to use aspell.

This script also demonstrate how to verify various things such as find out if file exists or not or check for passed command line arguments.

# Write a shell script wrapper to check the spellings of any text document given as an argument.
# -------------------------------------------------------------------------
# Copyright (c) 2008 nixCraft project <http://cyberciti.biz/fb/>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------
# Path to ispell / spell command
# make sure argument is given to script
if [ $# -eq 0 ]
	echo "Syntax: $(basename $0) file"
	exit 1
if [ ! -f $file ]
	echo "Error - $file not a file!"
	exit 2
# make sure ispell is installed
if [ ! -x $SPELL ]
	echo "Error - $SPELL binary file does NOT exists; cannot check the spellings of $file."
	exit 3
# now check the spellings
$SPELL $file
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source, and DevOps topics via:
Category List of Unix and Linux commands
Disk space analyzers df ncdu pydf
File Management cat tree
Firewall Alpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilities NetHogs dig host ip nmap
OpenVPN CentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Manager apk apt
Processes Management bg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searching grep whereis which
User Information groups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPN Alpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.