v-grep LF ending

This commit is contained in:
myvesta 2023-08-09 15:45:37 +02:00 committed by GitHub
commit e82378c935
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,21 +1,21 @@
#!/bin/bash #!/bin/bash
# info: calling myvesta_grep PHP function # info: calling myvesta_grep PHP function
# options: PARAMETERS # options: PARAMETERS
# #
# The function is calling myVesta PHP replacement for GNU 'grep' command (but without regular expression) # The function is calling myVesta PHP replacement for GNU 'grep' command (but without regular expression)
#----------------------------------------------------------# #----------------------------------------------------------#
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
if [ -p /dev/stdin ]; then if [ -p /dev/stdin ]; then
STDIN=$(cat -) STDIN=$(cat -)
if [ ! -z "$STDIN" ]; then if [ ! -z "$STDIN" ]; then
echo "$STDIN" | php /usr/local/vesta/func/bash-to-php-interpreter.php 'myvesta_grep' "$@" echo "$STDIN" | php /usr/local/vesta/func/bash-to-php-interpreter.php 'myvesta_grep' "$@"
exit $? exit $?
fi fi
fi fi
php /usr/local/vesta/func/bash-to-php-interpreter.php 'myvesta_grep' "$@" php /usr/local/vesta/func/bash-to-php-interpreter.php 'myvesta_grep' "$@"
exit $? exit $?