It's about a program that works iteratively - gets input from stdin and pass the results over the stdout. There is a set a know text that need to be passed to this program and I've put them in a file begin.txt. So I can setup a pipe
cat begin.txt - | myprogram
The problem arrive later - if I want to send something that I already typed (with slight modification), the arrows doesn't work, because there is no history in cat
- Therefore I am looking for something that will keep the history per line.
Initially I've tried with vim and :.! myprogram but then after executing the entry (passed text) myprogram exits and then its status get lost. I need a way to keep the program working till passing my text/commands.
- Is it possible to run
vimin a way to act as a filter in a pipe in such continuous way?