4 ms·
you can use any editor you like. could be vi, vim, nvim, emacs. the point is that your editor receives text from stdin, and writes changes to stdout, in the mid
by commotionfever 4y ago
you can use any editor you like. could be vi, vim, nvim, emacs. the point is that your editor receives text from stdin, and writes changes to stdout, in the middle of a pipeline.
hopefully the examples in the readme make sense but maybe not?
- sargstuff 4y agoNot clear what advantage vi-pipe offers over already available ways to make use of an editor in the middle of a command line pipeline. aka built-in shell functionality, available program(s) and/or OS provided features (aka named pipe and/or redirection to/from editor from a socket). beginning of pipeline > output.txt; <editor of choice> output.txt; cat output.txt | rest of pipeline commands sed, stream editor, takes text from standard in and writes changes to standard out in the middle of a pipeline. sed does this without all the extra overhead a standard editor incurs. More flexibility with awk, but also more overhead than sed, but less than vim. With a bit of macro magic and/or readning from/writing out to named pipe, can do the same interactively with vim.
- sargstuff 4y agoUseful for command line testing of different malloc implimentations, real time system responsiveness via pv, and/or help tuning system internet buffers (aka tcp/ip). An automatically resizable buffer for vi-pipe would be helpful for command line malloc implimentations test via dd & pv commands.