Skip to content
Advertisement

sed fails with errors

I’m trying to replace the next string with sed in all the files in the current directory : (including apostrophe) ‘Control_Reports_Pg.C_Table_Title_Date’

with the string : timeofday()::varchar(250)

I tried to escape the special characters ‘ ( ) with the command :

JavaScript

The error I got : sed: -e expression #1, char 22: unknown command:_’

I read online that I dont need to escape underscore so what can I do ? When I try to escape underscore with i also get an error :

JavaScript

Thanks..

Advertisement

Answer

Try this:

JavaScript

Never hurts to make a backup file ;}

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