@nsarri , welcome, please, code/data to be in triple backticks - use the menu options to do this (i've done it this time for you !)
possible solution below enlosed in double quotes with multiple substitutions separated by semi-colon (read the sed man page for details etc) , - (there'll be others)
NB:I don't have oracle so haven't tried using an intermediate process
cat disablejobs.sql
exec dbms_Scheduler.disable('NSARRI.JOB_DATADUMP_ADMIN_11', force => TRUE);
sed -i "s/disable(/disable\('/g ; s/, force/', force/g" disablejobs.sql
cat disablejobs.sql
exec dbms_Scheduler.disable('NSARRI.JOB_DATADUMP_ADMIN_11', force => TRUE);
MunkeHoller,
Thanks for responding. I can do that myself running the sed from the command line. That's not the problem. The issue comes when I use this in a shell script.
I am having a hard time putting a tick where I need to put. But if I want to put dot or any other character? that works. But not a tick, as it thinks that a tick needs to have a closing tick.
The problem is, you need another level of quoting. You found the best solution, the " " quotes for the second level.
The alternative is ugly.
You correctly had: to quote a ' within ' ' it must be '\''
Now the next level: to quote a '\'' within ' ' it would be '\''\'\'''\''
Prove:
bash -c 'echo '\''A '\''\'\'''\''ticked'\''\'\'''\'' word.'\'''
A 'ticked' word.