Lingua Franca - Error on Task 16 (sed)

I used the proper code given in the solutions:

sed -i ‘s/Lingua-Franca/Lingua Franca/g’ */ *.txt

however my Terminal returns the following:

sed: 1: “africa/afrihili.txt”: command a expects \ followed by text

Anyone can help? I’m using zsh for Mac

This issue has cropped up before, see the following thread(s) for a little discussion and some potential solutions-

The instructions appear to be written for a GNU version of sed whereas the mac is using a BSD version. If you’re uncertain about the sed command on a given system then man sed may help.


It’s a good heads up for working with linux/unix. Different versions can give subtle but big differences (like for example, the default python3 version that installs when you’re setting things up). These are definitely things I wish I realized earlier…

1 Like

Adding the -e argument worked on newer MacOS

sed -i’Lingua-Franca’ -e ‘s/Lingua-Franca/Lingua Franca/g’ /.txt