From e82378c9358ae98ec0b4c50722890b9fd9f7c33f Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Wed, 9 Aug 2023 15:45:37 +0200 Subject: [PATCH] v-grep LF ending --- bin/v-grep | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/bin/v-grep b/bin/v-grep index 3e4671296..045751a5b 100644 --- a/bin/v-grep +++ b/bin/v-grep @@ -1,21 +1,21 @@ -#!/bin/bash -# info: calling myvesta_grep PHP function -# options: PARAMETERS -# -# The function is calling myVesta PHP replacement for GNU 'grep' command (but without regular expression) - -#----------------------------------------------------------# -# Action # -#----------------------------------------------------------# - - -if [ -p /dev/stdin ]; then - STDIN=$(cat -) - if [ ! -z "$STDIN" ]; then - echo "$STDIN" | php /usr/local/vesta/func/bash-to-php-interpreter.php 'myvesta_grep' "$@" - exit $? - fi -fi - -php /usr/local/vesta/func/bash-to-php-interpreter.php 'myvesta_grep' "$@" -exit $? +#!/bin/bash +# info: calling myvesta_grep PHP function +# options: PARAMETERS +# +# The function is calling myVesta PHP replacement for GNU 'grep' command (but without regular expression) + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + + +if [ -p /dev/stdin ]; then + STDIN=$(cat -) + if [ ! -z "$STDIN" ]; then + echo "$STDIN" | php /usr/local/vesta/func/bash-to-php-interpreter.php 'myvesta_grep' "$@" + exit $? + fi +fi + +php /usr/local/vesta/func/bash-to-php-interpreter.php 'myvesta_grep' "$@" +exit $?