I would like to have a shell script to do a find and replace on anything without using regular expressions (regex), that includes all the specials chars such as !@#$%¨&*()?^~]}[{´`>.<,"'
So for example the function would be able to receive two parameters where the 1st will be what I want to find, and the second parameter will be what will be replaced with.
Example 1:
File1:
BETWEEN TO_DATE('&1','YYYY-MM-DD') +1 and TO_DATE('&2','YYYY-MM-DD') +15
First parameter: TO_DATE('&1','YYYY-MM-DD')
Second parameter: TO_DATE('&1 23:59:59','YYYY-MM-DD HH@$:MI:SS')
File1 after calling the function to replace:
BETWEEN TO_DATE('&1 23:59:59','YYYY-MM-DD HH@$:MI:SS') +1 and TO_DATE('&2','YYYY-MM-DD') +15
Example 2:
File2:
This is just a test/2^
Paramter1: test/2^
Paramter1: testing\$2^]'
File2 after calling the function to replace:
This is just a test/2^
The param1 and param2 could be really anything.
I need to use UNIX OS AIX it could be KornShell (ksh) using sed or awk. I can not use either perl or Java. I also can not install anything on this server.