With the files marked, you can call a shell command on them with the !
key. When prompted, you can use the *
key to indicate where you want all the marked files to appear. To get the line count of all the files, you want to pass them to wc
as a single file, which you can create temporarily via cat
. Which gives us:
- mark all files
!
- enter
cat * | wc -l
Which will produce the output
210
Alternatively, you can drop cat
, and just do:
for the last step, which will produce the output
100 file1
50 file2
60 file3
210 Total
Note that wc -l
without the *
won't work, as that will just give you the line counts for each file, not all three together.