I have a file 'filelist' that contains the following lines:
text1.txt
text2.txt
text3.txt
I am looking for a command line invocation that opens the 3 files in vim. I tried the following:
$ cat filelist | vim -
and
$ vim < cat filelist
but those do not yield the desired result.
Best Answer
If the file names don't contain spaces or other problematic characters, you can use
For file names with spaces, using
xargs
is more robust (here using GNUxargs
specific options):