I was just curious if there's a way to get input not from StdIn
but from $EDITOR
- be it vim, nano, emacs or even a non-command-line-editor (MacVim/TextMate). What are the options/workarounds/bestpractices?
Basically I'd wish for a workflow as with heredoc
- but from the $editor instead.
$ sort -nr << FOO | uniq -c
pipe heredoc> foo
pipe heredoc> bar
pipe heredoc> baz
pipe heredoc> foo
pipe heredoc> FOO
2 foo
1 baz
1 bar
heredoc
there should be opened text editor that allows you to input text, and after you quit editor all that you write in it is treated as input to sort and uniq? – pbm Mar 22 '12 at 16:32