Use the last command\’s output as input to a command without piping and bind to it to a key sequence in bash.
2010-09-01
181 words
1 min read
Use the last command’s output as input to a command without piping and
bind to it to a key sequence in <a class="zem_slink" title="Bash (Unix shell)" rel="homepage" href="http://tiswww.case.edu/php/chet/bash/bashtop.html">bash.
1
|
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)
<a class="zem_slink" title="Uniform Resource Locator" rel="wikipedia" href="http://en.wikipedia.org/wiki/Uniform_Resource_Locator">URL:
<a href="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.">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.<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.commandlinefu.com/commands/view/5034/google-translate">Google Translate | commandlinefu.com (commandlinefu.com) <li class="zemanta-article-ul-li"><a href="http://www.nofluffjuststuff.com/blog/matthew_mccullough/2010/08/git_bash_prompt">Git Bash Prompt (nofluffjuststuff.com) <li class="zemanta-article-ul-li"><a href="http://www.innovationsts.com/blog/?p=1395">Writing Better Shell Scripts – Part 1 | Innovations Technology Solutions | Blog (innovationsts.com) <li class="zemanta-article-ul-li"><a href="http://blog.extracheese.org/2010/05/the-tar-pipe.html">The Tar Pipe (extracheese.org) <div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=519b6bb2-2552-40a7-a9dc-c70e8d4afe3d" alt="Enhanced by Zemanta" /><span class="zem-script more-related pretty-attribution">
Related Articles:
- 2010/08/13 tee to a file descriptor
- 2010/06/25 Magic space on the current command line
- 2010/06/22 cdargs – bash cd command with bookmarks and browser.
- 2010/06/06 colors in bash – script to display all the possible colors.
- 2010/05/10 coproc help - a new feature in bash