问题描述:

This question already has an answer here:

  • Make a Bash alias that takes parameter?

    9 answers

网友答案:

try this;

echo "$(my_tool_1 -version 2>&1)" | sed 's/my_tool_1/my_tool/'

"2>&1" simply points everything sent to stderr, to stdout instead.

相关阅读:
Top