my question seems to be general, but i can\'t find any answers.
In sed command, how can you replace the substitution pattern by a value returned by a simple bash fun
you can use the "e" option in sed command like this:
cat t.sh myecho() { echo ">>hello,$1<<" } export -f myecho sed -e "s/.*/myecho &/e" <
you can see the result without "e":
cat t.sh myecho() { echo ">>hello,$1<<" } export -f myecho sed -e "s/.*/myecho &/" <