GNU sed
:
sed -i 's/--/—/g' *.txt
OSX BSD sed
:
You need to specify a backup file extension. To create a backup file with the extension: .txt.bak
:
sed -i '.bak' 's/--/—/g' *.txt
To completely replace the files, specify an empty extension:
sed -i '' 's/--/—/g' *.txt