#!/bin/bash url="https://it3110.cs.utahtech.edu/notes/2022/alice_sample.txt" wget $url while read line do sentence='' for word in $line do if [ $word == 'the' ] then word='COW' elif [ $word == 'a' ] then word='XXXX' elif [ $word == 'to' ] then word='98767' fi sentence="$sentence $word" done echo $sentence done < alice_sample.txt