9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-10-09 01:17:19 +02:00

Better regexp fon non-ascii files

This commit is contained in:
Emmanuel Giner LCT 2020-03-31 19:02:03 +02:00
parent a659174451
commit 4fa1cdd4d2

View File

@ -29,9 +29,12 @@ if [[ -z ${QP_ROOT} ]] ; then
fi
FILES=$(grep -P "\xA0" ${QP_ROOT}/src/*/*.f | cut -d ':' -f 1 | sort | uniq)
FILES=$(grep -e "[\x{00FF}-\x{FFFF}]" ${QP_ROOT}/src/*/*.f | cut -d ':' -f 1 | sort | uniq)
for F in $FILES ; do
echo "Cleaning $F"
vim -c "% s/\%xA0/ /g" -c ":wq" $F
# vim -c "% s/\%xA0/ /g" -c ":wq" $F
perl -pi -e 's/[^[:ascii:]]/ /g' $F
done