[Haifux] [HAIFUX LECTURE] Command-line utilities: Tips and tricks (part II) -- Eli Billauer
Daniel Shahaf
d.s at daniel.shahaf.name
Mon Aug 19 00:08:04 IDT 2013
Amos Shapira wrote on Sun, Aug 18, 2013 at 08:46:02 +1000:
> And the list goes on and on.
Some of the odd corners of shell syntax are quite useful in interactive
usage. For example:
% (){ foo $1 bar } 24
to run a command several times (recalling it from history) and change
some parameter around the middle of the command line without having to
scroll to it every time.
% grep $smtp_id *(om[1,5])
to grep the 5 most recent log files.
I suppose bash has its own syntax for that but I don't know what it is.
Daniel
(naturally, I don't use these in scripts #!ed to plain sh)
More information about the Linux-il
mailing list