I am trying to replace a word irrespective of it's case in a file using sed command as below:
sed -ie s/$tbl/$third_ele/gI $sql_file
$tbl contains word S_ASSET and
$third_ele contains table_01. This breaks when the file contains word S_ASSET_XA, the script replaces S_ASSET_XA to table_01_XA which i don't want. I need to match it exactly while replacing because i have another instance where S_ASSET_XA should be replaced with another word table_02.
How can i achieve this?