当前位置: 动力学知识库 > 问答 > 编程问答 >

shell - alias command with an option

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: