Cool Shells and File Operations

2 - more history: fast replace and reuse arguments

Quickly replace a mistake

bash, tcsh ^[target string]^[replacement string] [flend@fulmination tmp]$ ls *.jpef ls: *.jpef: No such file or directory [flend@fulmination tmp]$ ^f^g ls *.jpeg pc.jpeg

Reuse arguments from the previous line

bash !$ - the last argument !* - all arguments bar the first !n - the n-th argument !x-y - the arguments from positions x to y !x* - all arguments from position x to the end

for example

[flend@spiffy ANSIColor-1.01]$ make Makefile.PL make: *** No rule to make target `/usr/lib/perl5/5.00503/i386-linux/Config.pm', needed by `Makefile'. Stop. [flend@spiffy ANSIColor-1.01]$ perl !$ perl Makefile.PL Writing Makefile for Term::ANSIColor
[Next] [Contents]