bash – Unix命令行历史替换^ foo ^ bar(用于多个替换)

偶尔使用bash命令替换上一个命令中的字符串:
^foo^bar

今天我想用下面的代替替换所有出现的复选框与`radio

$ git mv _product_checkBox_buttons.html.erb _product_checkBox_button.html.erb
$ ^checkBox^radio
git mv _product_radio_buttons.html.erb _product_checkBox_button.html.erb

所以它只取代了第一次发生。如何使其替代所有的事件?

bash --version
GNU bash,version 3.2.48(1)-release (x86_64-apple-darwin10.0)
copyright (C) 2007 Free Software Foundation,Inc.
男人bash说^ old ^ new相当于!!:s / old / new /。你想!!:gs / old / new /来全局替换。

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...