This issue has cropped up before, see the following thread(s) for a little discussion and some potential solutions-
Step 16 doesn’t seem to work for me on MacOS. Information I found online seems inconclusive but the fault seems to be MacOS specific. Any idea what causes the problem here?
lingua-franca👽$ sed -i 's/Lingua-Franca/Lingua Franca/g' */*.txt
sed: 1: "africa/afrihili.txt": command a expects \ followed by text
lingua-franca👽$ grep -Rl 'Lingua-Franca' */*.txt | wc -l
The following version worked. I skipped -i and it worked.
Hi all, I ran into a problem during Lingua Franca. the sed command returned an error invalid command W. Searching for an answer brought me to this
If you are on a OS X, this probably has nothing to do with the sed command. On the OSX version of sed , the -i option expects an extension argument so your command is actually parsed as the extension argument and the file path is interpreted as the command code.
Try adding the -e argument explicitly and giving '' as argument to -i :
sed -i '' -e "…
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.