#!/bin/bash # fanta # Helper script to find words in the spanish worlde version wordList="words-es.txt" function showError(){ echo "[Error] $1" } if [ -z "$1" ]; then showError "Example: wordle.sh n..io (The dots are the unknown characters)" else if [ $(echo -n "$1" | wc -m) -le 5 ]; then grep -iEw "$1" $wordList # la salida tendria que ser de palabras solamente con 5 caracteres else showError "Too many characters my friend. They must be 5" fi fi