3 ms·
!! expands the command after you type enter first...
by banachtarski 10y ago
!! expands the command after you type enter first...
- icebraining 10y agoIt expands and then immediately executes, at least in bash by default.
- devnonymous 10y agodepends on your histverify setting for 'shopt' do a shopt -s histverify versus shopt -u histverify and then add whatever you prefer (-s probably) to your bashrc
- kbenson 10y agoFor a personal system, that's fine. For the situation where you are a sysadmin and are jumping onto one of possibly hundreds of systems, I prefer not to rely on a behavior that is specifically made more safe (implying it is less safe as it exists by default) by active configuration. In that situation, it's much easier to just not use the less safe version in favor of the safer version if not too burdensome, and both exist.
- devnonymous 10y ago...otoh, if you are a sysadmin managing possibly hundreds of systems, you shouldn't be 'jumping onto' any one of them at all these days ! You ought to be using fabric, chef, puppet, ansible ...etc ...Ha ha, only serious ;-)
- kbenson 10y agoSure, those reduce the instances you'll need a shell on a box, but they can't eliminate them. Sometimes you just need to see what's going on on that box, run top, see why there's a few thousand messages in the mail spool ad coax them through, figure out why SQL isn't responding or keeps dying, etc, etc.