Hi ,
We have a standard Solaris installation so no "i" option for case insensitive sed.
I have a lot of oracle views in which I need to replace the table names with different tablenames. There is one script per view.
So the set of oracle scripts is like V_123.sql , V_ABC.sql , V_DEF.sql etc.
Now, I have created a file(replace_tab_names.txt) with what I need to replace, and the contents are as below
{
s/TAB_NAME_A/TAB_NAME_NEW_A/ig
s/TAB_NAME_B/TAB_NAME_NEW_B/ig
s/TAB_NAME_C/TAB_NAME_NEW_C/ig
}
Then I have shell script (sed_replace.sh) which looks like
for filename in `ls -1 V_*.sql `
do
sed -f replace_tab_names.txt $filename > $filename.A2
done
Ofcourse it says
sed: command garbled:
and that is because of the "i" for case insensitive option.
Any ideas how else could I do this..
Many Thanks.
We have a standard Solaris installation so no "i" option for case insensitive sed.
I have a lot of oracle views in which I need to replace the table names with different tablenames. There is one script per view.
So the set of oracle scripts is like V_123.sql , V_ABC.sql , V_DEF.sql etc.
Now, I have created a file(replace_tab_names.txt) with what I need to replace, and the contents are as below
{
s/TAB_NAME_A/TAB_NAME_NEW_A/ig
s/TAB_NAME_B/TAB_NAME_NEW_B/ig
s/TAB_NAME_C/TAB_NAME_NEW_C/ig
}
Then I have shell script (sed_replace.sh) which looks like
for filename in `ls -1 V_*.sql `
do
sed -f replace_tab_names.txt $filename > $filename.A2
done
Ofcourse it says
sed: command garbled:
and that is because of the "i" for case insensitive option.
Any ideas how else could I do this..
Many Thanks.