Closed FredLackeyOfficial closed 5 years ago
You need to escape the (
and )
in the regex part.
shx sed 's/function \(sequelize, DataTypes\)/(sequelize, DataTypes) =>/g' ...
shx sed
isn't quite a drop-in replacement for unix sed
. Contributions are welcome, however.
^ Closing for now, since I think I've answered your question. For the time being, I think it's easier to just live with shx sed
's quirks until we can make a more-complete shell.sed()
in ShellJS.
No combination of regex or separate strings works for replacing a string in a series of files.
My goal is to change this file...
... to this ...
The command I'm currently using is:
It is currently used within the
package.json
file of a Node project:Please explain the correct syntax.