Just wanted to join party:
grep '' * --recursive -H --max-count=5 --include '*.csv'
Grep can search recursively, and prepend the filename to the matched lines, and limit the number of matches from each file. Combine all that, and you get a solution, only problem is that the filename is followed by a colon:
subdir/test2.csv:1 subdir/test2.csv: subdir/test2.csv:2 subdir/test2.csv:3 subdir/test2.csv:4 test1.csv:1 test1.csv:2 test1.csv:3
so you'd need to replace that...
grep '' * -r -H -m5 --include '*.csv' | sed 's/:/,/'
@cyclotron3k started
London Fixed Gear and Single-Speed is a community of predominantly fixed gear and single-speed cyclists in and around London, UK.
This site is supported almost exclusively by donations. Please consider donating a small amount regularly.
Just wanted to join party:
Grep can search recursively, and prepend the filename to the matched lines, and limit the number of matches from each file. Combine all that, and you get a solution, only problem is that the filename is followed by a colon:
so you'd need to replace that...