Find And Replace

Create Example File With List Of Adventurers

echo 'Luca Gartside' >> adventurers.txt
echo 'Reule Smyth' >> adventurers.txt
echo 'Spencer Smit' >> adventurers.txt

View Original File

$ cat adventurers.txt
Luca Gartside
Reule Smyth
Spencer Smit

Search And Replace

Here we use the streaming edit (sed) command to replace Spencer Smit with Matthew Aldworth in the file adventurers.txt

$ sed "s/Spencer Smit/Matthew Aldworth/" adventurers.txt
Luca Gartside
Reule Smyth
Matthew Aldworth