#!/bin/bash url="https://computing.utahtech.edu/it/3110/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