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

Hi there,
while I was doing an offline project “Lingua-Franca-project”, I had an error message while even using the solution command line " ```
sed -i ‘s/Lingua-Franca/Lingua Franca/g’ /.txt

Don’t use apostrophes or single quotes in file names.

1 Like

change to quotation mark (“”) didn’t work, either. Thanks.

If there is a space you also have to wrap the whole file expression in quotes for operations. Also what shell are you running? sed may work differently on different shells (Why does sed behave differently in a shell script? - Stack Overflow)

What is the exact error message. Screenshots could help a lot here. Or very precisely formatted typing.


I’m having the same issue as OP.

I first tried this command
sed -i 's/Lingua-Franca/Lingua Franca/g' */*.txt

Then I tried this:
sed -i 's/Lingua-Franca/"Lingua Franca"/g' */*.txt

In both cases, this is the error message I receive:
sed: 1: "arabic.txt": command a expects \ followed by text

I found this answer: macos - sed command with -i option failing on Mac, but works on Linux - Stack Overflow so that the command would read as sed -i’’ -e ‘s/Lingua-Franca/Lingua Franca/g’ /.txt