From 675c3a7c95b7427f3f6517302d5306f488852637 Mon Sep 17 00:00:00 2001 From: Thomas Mayer Date: Sun, 29 Mar 2015 18:08:47 +0200 Subject: [PATCH] use printf instead of echo for POSIX compatibility (issue #1003) --- config/action.d/mail-whois-common.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/action.d/mail-whois-common.conf b/config/action.d/mail-whois-common.conf index 178081e4..1da54286 100644 --- a/config/action.d/mail-whois-common.conf +++ b/config/action.d/mail-whois-common.conf @@ -17,7 +17,7 @@ _whois = whois || echo "missing whois program" # character set before sending it to a mail program _whois_target_charset = UTF-8 _whois_convert_charset = whois | - { c=$(cat) ; cs=$(echo -ne "$c" | file -b --mime-encoding -) ; echo -ne "$c" | iconv -f $cs -t %(_whois_target_charset)s//TRANSLIT - ; } + { c=$(cat) ; cs=$(printf %%b "$c" | file -b --mime-encoding -) ; printf %%b "$c" | iconv -f $cs -t %(_whois_target_charset)s//TRANSLIT - ; } # choose between _whois and _whois_convert_charset in mail-whois-common.local # or other *.local which include mail-whois-common.conf.