From 39dac63d8234a56e5dc4263e4fa47c7dcb62b8d7 Mon Sep 17 00:00:00 2001 From: Lorenzo Cogotti Date: Wed, 11 Aug 2021 23:46:55 +0200 Subject: [PATCH] [tools/bgpscanner] Fix -o quoting (and options quoting in case PRETEND=y) --- tools/bgpscanner/bgpscanner | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/bgpscanner/bgpscanner b/tools/bgpscanner/bgpscanner index 281e262..7521e94 100755 --- a/tools/bgpscanner/bgpscanner +++ b/tools/bgpscanner/bgpscanner @@ -321,11 +321,12 @@ exprcompile [ "$TGT" = bgpgrep ] && [ "$DUMPBYTEC" = yes ] && OPTS=$(append "$OPTS" --dump-bytecode) [ "$TGT" != bgpgrep ] && OPTS=-r -[ -n "$OUTREDIR" ] && OPTS=$(append "$OPTS" "-o $OUTREDIR") +[ -n "$OUTREDIR" ] && OPTS=$(append "$OPTS" "-o \"$OUTREDIR\"") CMD="exec" if [ -n "$PRETEND" ] && [ "$PRETEND" = 1 ] || [ "$PRETEND" = y ] || [ "$PRETEND" = yes ]; then CMD="echo" + OPTS=$(quote "$OPTS") EXPR=$(quote "$EXPR") fi