On 5/18/2011 12:02 PM, Bowie Bailey wrote:
On 5/18/2011 12:58 PM, Les Mikesell wrote:
On 5/18/2011 11:33 AM, Bowie Bailey wrote:
On 5/18/2011 11:34 AM, Michael Gliwinski wrote:
Note that there's also a shortcut for cat (without launching a subprocess):
$ vim $(< listfile)
That's one of those occasionally-useful tidbits that I will have completely forgotten about by the time I need to use it again! :-)
Don't think of it as a special case. It is a combination of two generically useful simple operations. Unix, the shell, and vi are all about being able to reuse and combine simple steps instead of special-casing everything.
Right. I was referring to the shell shortcut "$(< filename)". Simple - Useful - and probably forgotten by the time I need it again.
That's the same thing I meant. It is $(command) which is the same as `command` where the output of the command replaces it on the command line before further evaluation. That's something you can use frequently. And '< filename' to control i/o redirection is something you can use even more frequently. So it's like doing '20i- <esc>' inside of vi to insert a dashed line. You don't have to know specifically that you can give a count with the insert command, you just know you can combine a count with any command.