mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
v-grep LF ending
This commit is contained in:
parent
843d4a94e2
commit
e82378c935
1 changed files with 21 additions and 21 deletions
42
bin/v-grep
42
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 $?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue