Sounds cool...
The one that I use the most in the !$ and !! substitutions in bash/tcsh (and probably csh too). So instead of doing a
Code:
mkdir someLongDirName
cd someLondDirName
I do a
Code:
mkdir someLongDirName
cd !$
and instead of
Code:
vi someDodgyScript
chmod 700 someDodgyScript
./someDodgyScript
(someDodgyScript: yeah right, call that code - *CRASH*)
vi someDodgyScript
I'll end up doing
Code:
vi someDodgyScript
chmod 700 !$
./!$
(someDodgyScript: yeah right, call that code - *CRASH*)
vi !!
Looks a bit wierd to read but can save ya time.
The same goes for making typos in big command and using the ^original^replacement^ to do the substitution. So
Code:
/some/dir/that/is/a/sod/TO/find/aBinary
(*error! TO should be to*)
/some/dir/that/is/a/sod/to/find/aBinary
becomes
Code:
/some/dir/that/is/a/sod/TO/find/aBinary
(*error! TO should be to*)
^TO^to^
Jamie...