From 6df2b092abcc2e05db754080a1fe784543de1295 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 19 Feb 2018 01:09:56 +1100 Subject: [PATCH] README: Update clean_code() function to process more non-ASCII chars. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 097fe34..b57848a 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,8 @@ files before committing them here: A shell function to do this processing is: ```sh function clean_code() { - cat $1 | awk "{sub(/[\t ]*\r/,\"\")}1" | expand -t 4 | tr \\200\\221\\222\\223\\224\\226\\231\\265\\327\\342 \'\'\'\"\"-\'ux\' > tmp$$ + chmod 644 $1 + cat $1 | awk "{sub(/[\t ]*\r/,\"\")}1" | expand -t 4 | tr \\200\\205\\211\\221\\222\\223\\224\\226\\231\\244\\261\\265\\302\\327\\342 \'??\'\'\"\"\\-\'??u?x\' > tmp$$ mv tmp$$ $1 } ```