2
$touch file{1,2}
$echo "file1" >> file1
$^1^2
=>echo "file2">>file1
但我想它是擊:不止一個命令行替換
echo "file2">>file2
如何做的比一個替代嗎?
$touch file{1,2}
$echo "file1" >> file1
$^1^2
=>echo "file2">>file1
但我想它是擊:不止一個命令行替換
echo "file2">>file2
如何做的比一個替代嗎?
!!:gs/1/2
應該這樣做。 ^1^2
是!!:s/1/2
的快捷方式,您只需提供g
標誌即可。
我試過'$^1^2; !!',它沒有工作。謝謝 –
@VihaanVerma按建議**嘗試**。說'!!:gs/1/2'或'!!:as/1/2'。 – devnull
同樣的問題已發佈在http://superuser.com/questions/651535/bash-more-than-one-command-line-substitution – devnull