I am new to shell scripting and have a request to modify multiple files. I have the input as below
#this is line1 for [email protected]
test line 2
test line 3
this is line4 for [email protected]
test line 5
this is line6 for [email protected]
and need output like
#this is line1 for [email protected]
test line 2
test line 3
##this is line4 for [email protected]
this is line4 for [email protected]
test line 5
##this is line6 for [email protected]
this is line6 for [email protected]
I tried the below command to do this changes and it changes only abc to xyz and other are not getting changed
sed '/^[^#].*@abc.com/ {h; s/^/##/; p; g; s/abc.com/xyz.com/;}'
Please help me to modify the script case-insentitive
xyz.comand it has to match case also likeAbc.COM => Xyz.COM?