how to replace [ characters using sed command code example Example: replace using sed #on my mac sed -i -e 's/old-text/new-text/g' text.txt