Lingua Franca - step 16

Hi all.

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?

Thanks

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
       6
lingua-franca👽$ 

Edit

The following version worked. I skipped -i and it worked.

sed 's/Lingua-Franca/Lingua Franca/g' */*.txt

Yea different systems have slightly different procedures. You can always type man sed or man anything for that matter to see what your specific system documentation is.

Great tip about man command. Thanks!

1 Like

I find this command works on MacoS (without the -i) but it dosnt save the files, it just shows the output. If i look in the files after this command then i dont see them as updated.
So on MacOS you need to run the following command to update the files with the sed command:

sed -i ‘’ ‘s/Lingua-Franca/Lingua Franca/g’ <filename(s)>.

I’m still confused by this and cant seem to stop getting sed: 1: “africa/afrihili.txt”: command a expects \ followed by text

what filename are you putting after after sed -i ‘’ ‘s/Lingua-Franca/Lingua Franca/g’ ?

thanks

I found the solution in this stackoverflow Q&A. Hope it helps!
https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linux`

1 Like

perfect thank you so much

1 Like