I need to remove special characters from all .htm files in a directory.
Ideally I need to keep the file name but if I have to I can copy each file to 1 or something like that.
Here is the command I need to run on each file: tr '\015' '\n' < $filename > $filename.1
Asked
Active
Viewed 3,209 times
0
1 Answers
1
I don't know what OS and interpreter you use, but this works for me on Debian/Bash:
for file in *.htm; do
tr "\044" "\n" < $file > $file.1;
done

NeplatnyUdaj
- 276
for file in /dir/* do your command done
– NeplatnyUdaj Jun 27 '14 at 14:12