Hi,
I am on Sun Solaris and struggling with a very simple sed command.
I want to search and replace, ignoring the case.
Lets say, I have a file,
Abcd
abCd
abcD
And I issue a command,
sed -e 's/abcd/CORRECT/i' my_file
This should give output like,
CORRECT
CORRECT
CORRECT
But, my above sed command is giving error like,
sed: command garbled: s/abcd/CORRECT/i
If I take out the 'i' from the command, it runs but then its case sensitive.
What is the flag for ignoring the case on Solaris ?
What can be another way out of this issue ?
Please help.
Thanks
I am on Sun Solaris and struggling with a very simple sed command.
I want to search and replace, ignoring the case.
Lets say, I have a file,
Abcd
abCd
abcD
And I issue a command,
sed -e 's/abcd/CORRECT/i' my_file
This should give output like,
CORRECT
CORRECT
CORRECT
But, my above sed command is giving error like,
sed: command garbled: s/abcd/CORRECT/i
If I take out the 'i' from the command, it runs but then its case sensitive.
What is the flag for ignoring the case on Solaris ?
What can be another way out of this issue ?
Please help.
Thanks