#!/bin/bash if [ "$#" -ne 1 ]; then echo "usage: $0 " exit 1 fi input_file_url=$1 input_file="in.txt" wget -O "$input_file" "$input_file_url" || { echo "Eroare downloading input file."; exit 2; } if ! dpkg -l | grep -qw wbritish; then echo "wbritissh not installed, installing" sudo apt-get update && sudo apt-get install -y wbritish fi if [ ! -f "$input_file" ]; then echo "input file does not exist: $input_file" exit 2 fi #read each word from input file and check if it is present in dictionary 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"