how do I output multiple files with a heading for each one but without needing to page through them?
0
votes
1
answer
537
views
I am running a file search command with
ag -g foo
and I'd like to see the contents of the files I find.
If I do ag -g foo | xargs more
then the more
command makes me press the spacebar to advance between each file, even though they are small enough that I could see more than one at a time in my terminal window.
If I do ag -g foo | xargs cat
then I see everything at once, but the files are mushed together so it's hard to see where a new file starts.
Is there a way to see the files all in one scroll, but with a heading for each one?
Asked by joachim
(7877 rep)
Nov 2, 2020, 11:30 AM
Last activity: Nov 2, 2020, 12:21 PM
Last activity: Nov 2, 2020, 12:21 PM