This removes \N, replaces it with " "and then chops off the last character of each line and inserts a space there. Do you know about dos2unix (or dos2ux)?
Code:
find ./ -name "*.dmp" | xargs perl -pi -e 's/\\N/ /g; s/.$/ /g'
If you want it to run faster try using background processes:
Code:
cnt=0
find ./ -name "*.dmp" |\
while read file do
perl -pi -e 's/\\N/ /g; s/.$/ /g' $file &
cnt=$cnt+1
z=$(( $cnt % 10 ))
if [[ $z -eq 0 ]] ; then
wait
fi
done
wait
This runs ten process at the same time in background. And then waits for completion. The code you proivided does not replace the characters with a space