From 36c14f492a481720286659a96112d70573b1c4f5 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Tue, 24 Jan 2012 12:15:29 -0700 Subject: [PATCH] Don't use grep -q. --- bin/pt-stalk | 2 +- lib/bash/parse_options.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pt-stalk b/bin/pt-stalk index b742d071..404187ed 100755 --- a/bin/pt-stalk +++ b/bin/pt-stalk @@ -301,7 +301,7 @@ _parse_command_line() { real_opt="$opt" - if $(echo $opt | grep -q '^--no-'); then + if $(echo $opt | grep '^--no-' >/dev/null); then opt_is_negated=1 opt=$(echo $opt | sed 's/^--no-//') else diff --git a/lib/bash/parse_options.sh b/lib/bash/parse_options.sh index 9a71034a..23443bb4 100644 --- a/lib/bash/parse_options.sh +++ b/lib/bash/parse_options.sh @@ -370,7 +370,7 @@ _parse_command_line() { real_opt="$opt" # Strip leading -- or --no- from option. - if $(echo $opt | grep -q '^--no-'); then + if $(echo $opt | grep '^--no-' >/dev/null); then opt_is_negated=1 opt=$(echo $opt | sed 's/^--no-//') else