199
rated 0 times
[
199]
[
0]
/ answers: 1 / hits: 75605
/ 3 Years ago, mon, october 18, 2021, 2:44:02
I am trying to redirect the output of a bash command into a new file.
If I try the pipe as below :
ls -la | vim
Bash shows me the errors :
Vim: Error reading input, exiting...
Vim: preserving files...
Vim: Finished.
I know that I can open Vim and then use :
:r !ls -la
But is there a way to do this in bash itself, so that Vim is opened and the output is pasted there automatically?
More From » bash