Skip to content
Advertisement

Linux command line for find & replace not working

Im having an issue with this code in the command line:

JavaScript

For some reason i think it isnt working since the ’email’ but that is how the code is & i cant change it. Also im running it through the shell_exec for php. but i tried it directly and it wasnt working as well.

any ideas?

Advertisement

Answer

Because you have ' in your command, you need to use double quote " for sed.

Any char except ' will be literal (which means the will be literal, too), so you can rewrite your command as

JavaScript

If you write your command in a text editor (or notice the color on stackoverflow), the syntax highlight will help you determine the correctness of your command.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement