假設您處於以下情況:
<command 1>
<output of command 1>
<want to use output of command 1 here without have to retype it>
我的具體案例:
which eclipse
/usr/bin/eclipse
ldd /usr/bin/eclipe
但我不想輸入最後一行,有什麼捷徑嗎?
答案1
使用$()
:
ldd "$(which eclipse)"
假設您處於以下情況:
<command 1>
<output of command 1>
<want to use output of command 1 here without have to retype it>
我的具體案例:
which eclipse
/usr/bin/eclipse
ldd /usr/bin/eclipe
但我不想輸入最後一行,有什麼捷徑嗎?
使用$()
:
ldd "$(which eclipse)"