sed -i 's/--/–/g' *.txt
ought to work. The -i
flag to sed
makes it act on the files in-place, the s
stands for substitute, and the g
makes it replace multiple occurrences of the pattern on the same line. Look up sed
's documentation for more information.
EDIT: This works on GNU/Linux; it turns out that the syntax is slightly different on OSX (see comments and accepted answer).