How to replace keyword with quotes using sed

To replace replace keywork with quotes using sed, we can use sqaure brackets in the sed query.

#sed -i "s/[']search_keyword[']/'replace_keyword'/g" filename

Where,

search_keyword - the keyword that we need to seacrh with
replace_keyword - the keyword that we need to replace with
filename - the file name that we need to do the transacation

Leave a Reply

Your email address will not be published. Required fields are marked *