I know that some command-line programs can open visual editors like Sublime in a "wait mode" which opens the editor, lets you edit, and on-close it resumes the program with the file contents (like git commit). I'm wondering if there's any way to write a pipeline like this:
cat $file | sort | [open sublime in wait mode] | grep abc
Ie, I want to take the output of one command, open it in an editor, let me make edits, then it continues the pipeline with the file contents.
Thanks!
vipefor command-line ones: https://unix.stackexchange.com/a/282384/70524 If you can figure out the right way to inoke Sublime to make it wait, setting theEDITORorVISUALenvironment variable to that should work forvipe. – muru Mar 29 '20 at 10:16EDITOR='subl --wait'– muru Mar 29 '20 at 10:19catintosort, or tocatin anything actually.sort, as any program, can take a file as argument.sort $file | vipe | grep abcwill do the work. – Mar 29 '20 at 10:22