[tools/bgpscanner] Be more consistent about printf/echo usage

This commit is contained in:
Lorenzo Cogotti 2021-08-10 22:06:51 +02:00
parent a08e54b046
commit c7a2417499
1 changed files with 2 additions and 2 deletions

View File

@ -166,7 +166,7 @@ templatef() {
printf %s\\n "$UNQ"
done > "$TPL" || die "'$1': File conversion failed"
echo "$TPL"
printf %s\\n "$TPL"
}
quote() { printf %s\\n "$1" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/'/"; }
@ -199,7 +199,7 @@ exprcompile() {
pushterm
for i in $ATTRS; do TERM=$(append "$TERM" "-attr $i" "-or"); done
[ "$(echo "$ATTRS" | wc -w)" -gt 1 ] && TERM="\( $TERM \)"
[ "$(printf %s\\n "$ATTRS" | wc -w)" -gt 1 ] && TERM="\( $TERM \)"
pushterm
[ -n "$NCOMMS" ] && TERM="-not -communities \( $NCOMMS \)"