Browse Source

pcat: allow commands with spaces on arguments

Signed-off-by: Alejandro Mery <amery@geeks.cl>
master
Alejandro Mery 4 years ago
parent
commit
99bdbf05d2
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      files/bin/pcat

+ 8
- 3
files/bin/pcat

@ -141,8 +141,7 @@ done
# compose pipeline # compose pipeline
# #
# CMD
PIPELINE="$*"
PIPELINE=
# FROM/UNTIL FILTER # FROM/UNTIL FILTER
if [ -n "${FROM:-}${UNTIL:-}" ]; then if [ -n "${FROM:-}${UNTIL:-}" ]; then
@ -163,4 +162,10 @@ if [ -n "${SED_ARGS:-}" ]; then
fi fi
#and run #and run
eval "${PIPELINE:-cat}"
if [ $# -eq 0 ]; then
eval "${PIPELINE:-cat}"
elif [ -n "$PIPELINE" ]; then
"$@" | $PIPELINE
else
"$@"
fi

Loading…
Cancel
Save