Browse Source

pcat: combine `sed | sed` when there is no `grep` call

Signed-off-by: Alejandro Mery <amery@geeks.cl>
master
Alejandro Mery 4 years ago
parent
commit
3269d530a2
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      files/bin/pcat

+ 6
- 0
files/bin/pcat

@ -149,6 +149,12 @@ if [ -n "${FROM:-}${UNTIL:-}" ]; then
[ -z "${FROM:-}" ] || PIPELINE="$PIPELINE -e '0,/$FROM/d'"
[ -z "${UNTIL:-}" ] || PIPELINE="$PIPELINE -e '/$UNTIL/,\$d'"
# no grep? combine both sed calls
if [ -z "${GREP_ARGS:-}" -a -n "${SED_ARGS:-}" ]; then
PIPELINE="$PIPELINE $SED_ARGS"
SED_ARGS=
fi
fi
# GREP FILTER

Loading…
Cancel
Save