Alright, I have two folders. For simplicity's sake, I'll call them players
and items
. The items folder has a file for each item, and the people folder has a file for each person with references to which animals that person owns. This is what I have so far:
ls -1 ~/items | cut -d. -f1 | grep -R -f - ~/player
The grep syntax I got from here. I'm trying to get it to say:
electric: 8
laser: 7
loltrail: 2
Instead, I add the -c
flag to grep
and I get:
Bob.txt: 0
Cathy.txt: 0
John.txt: 0
Patrick.txt: 1
How do I get counts of the items in total, not the items for each person?
This is for figuring out how many items are being used in the Pointshop addon for Garry's Mod.