#!/bin/bash if [ "$#" -ne 1 ]; then echo "Usage: $0 " exit 1 fi input_file=$1 if ! dpkg -l | grep -qw wbritish; then echo "Installing wbritish package." sudo apt-get update && sudo apt-get install -y wbritish fi if [ ! -f "$input_file" ]; then echo "File does not exist: $input_file" exit 2 fi while IFS= read -r word; do if look "$word" /usr/share/dict/british-english > /dev/null; then echo "$word in dictionary" else echo "$word not in dictionary" fi done < "$input_file"