myvesta/bin/v-sed
2023-04-15 19:03:11 +02:00

22 lines
650 B
Bash

#!/bin/bash
# info: calling myvesta_sed PHP function
# options: PARAMETERS
#
# The function is calling myVesta PHP replacement for GNU 'sed' 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_sed' "$@"
exit $?
fi
fi
php /usr/local/vesta/func/bash-to-php-interpreter.php 'myvesta_sed' "$@"
exit $?