Use the last command\’s output as input to a command without piping and bind to it to a key sequence in bash.

Use the last command\’s output as input to a command without piping and
bind to it to a key sequence in bash.

1
 bind \'"\\C-h": "\\`fc\\ \\-s\\`"\'

My comment : fc is the fix command of the bash builtin.
This is similar to using `!!` or

In bash 4.1 it seems you can bind directly to a shell command, but I\’m
not running that version.

* View this command to comment, vote or add to favourites
* View all commands by rthemocap

commandlinefu.com

by David Winterbottom (codeinthehole.com)

URL:
http://feedproxy.google.com/~r/Command-line-fu/~3/Y59sGmIg24s/use-the-last-commands-output-as-input-to-a-command-without-piping-and-bind-to-it-to-a-key-sequence-in-bash.

\"Enhanced

2 thoughts on “Use the last command\’s output as input to a command without piping and bind to it to a key sequence in bash.”