diff options
author | Linus Nordberg <linus@nordu.net> | 2012-04-12 17:10:48 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2012-04-12 17:10:48 +0200 |
commit | 81c711a7519d17251e24da0df12ab56e0785e683 (patch) | |
tree | 7d0df15f6354a3246f1f8989ac9db492c8e83202 /tools | |
parent | 7758dd38282d58dff85422e7e5e165d360f6531b (diff) |
Use built-in echo rather than /bin/echo.
`-e' to /bin/echo isn't portable. The BSD's lacks it for instance.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/naptr-eduroam.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/naptr-eduroam.sh b/tools/naptr-eduroam.sh index 936948c..43d3d9f 100755 --- a/tools/naptr-eduroam.sh +++ b/tools/naptr-eduroam.sh @@ -8,7 +8,7 @@ # For host command this is column 5, for dig it is column 1. usage() { - /bin/echo "Usage: ${0} <realm>" + echo "Usage: ${0} <realm>" exit 1 } @@ -22,7 +22,7 @@ dig_it_srv() { ${DIGCMD} +short srv $SRV_HOST | sort -n -k1 | while read line; do set $line ; PORT=$3 ; HOST=$4 - /bin/echo -e "\thost ${HOST%.}:${PORT}" + echo -e "\thost ${HOST%.}:${PORT}" done } @@ -41,7 +41,7 @@ host_it_srv() { ${HOSTCMD} -t srv $SRV_HOST | sort -n -k5 | while read line; do set $line ; PORT=$7 ; HOST=$8 - /bin/echo -e "\thost ${HOST%.}:${PORT}" + echo -e "\thost ${HOST%.}:${PORT}" done } @@ -61,12 +61,12 @@ if [ -x "${DIGCMD}" ]; then elif [ -x "${HOSTCMD}" ]; then SERVERS=$(host_it_naptr) else - /bin/echo "${0} requires either \"dig\" or \"host\" command." + echo "${0} requires either \"dig\" or \"host\" command." exit 1 fi if [ -n "${SERVERS}" ]; then - /bin/echo -e "server dynamic_radsec.${REALM} {\n${SERVERS}\n\ttype TLS\n}" + echo -e "server dynamic_radsec.${REALM} {\n${SERVERS}\n\ttype TLS\n}" exit 0 fi |