How to use sed to replace & with &

unix

Solution

Based on the title of the question, you need to escape `&`:

sed 's/\&amp/\&/g' BX-Books.csv > r1.txt

Problem

Hi I have a file and want to replace all `& amp;` with `&` using sed. Can you tell me how to use sed for this, as the following command did not worked for me. ``` sed 's/& amp;/&/g' BX-Books.csv > r1.txt ``` Here & and amp have no space between.

Original source