eg. txtfile is just [
sed -i 's/[/linux/' txtfile (this gives an error unbalanced brackets ([])) after running the command I wanted to replace [ to linux
I tried \\ at the front, but I don't think it is correct and searched a while couldn't find anything useful. Thanks
-iwithsedunless you know yoursedexpression actually works. – Kusalananda May 08 '20 at 06:09