The book "Unix Power Tools" showed me that higher-level programming languages (Perl, Python, Ruby, etc) are not needed to accomplish most administrative tasks. Awk is incredibly useful (but also very confusing, imo).
The book "Unix Power Tools" showed me that higher-level programming languages (Perl, Python, Ruby, etc) are not needed to accomplish most administrative tasks. Awk is incredibly useful (but also very confusing, imo).
$ cd /big/long/path/to/this.txt Oops $ vim !$
It's also apparently not universally known that bash has csh-style (similar to sed) editing, so "s^foo^bar" will repeat the previous command with "bar" substituted at for bar. So "ls foo" becomes "ls bar".
Similarly with !-3:s^foo^bar
I freely mix these things with readline-editing, depending on what needs to be done.
Since csh gets a lot of disrespect these days, to give credit where due: these are all Bill Joy features from the original csh -- it's a good thing that bash borrowed innovations from various shells beyond Bourne shell and ksh.
Historical footnote: We donated code to him to do readline-style editing circa 1978, but he said raw mode was bogging down the pdp 11 too much. Systems were a bit slower back then.