Can I search/replace in multiple .txt files quickly from Terminal?

Viewed 15612

I have about 100 .txt files that contain plain text. Somehow, some of the data has been corrupted and needs to be found/replaced.

I need to search for the characters'--' and replace it with a long dash: '—'.

Is there a way to do this quickly with a command in terminal?

The names of the .txt files in my directory are numbered sequentially: 1.txt, 2.txt, etc.

Thanks!

2 Answers
Related