I want to grep across 500 files in a Maildir directory. I issued the command
grep MyPattern *
I got the error message:
bash: /usr/bin/grep: Argument list too long
So I stored the list of files in a file MyFiles, and issued the following
for i in $(
cat MyFiles
); do echo $i; done
Before I did a grep, I wanted to do an echo just as a check. But this gave the following error
bash: 1434361691.M617282P6399V0000000000000808I00000000000E16C1_23.ananda-linux,S=10055:2,S: command not found
where that 1434... thing is the first file in the directory.
So back to the original question. How do I grep across all these files in the mailbox. And I have larger mailboxes containing 50000 or more emails.
Asked by Sanjay Chakravarty
(21 rep)
Apr 26, 2018, 08:02 AM
Last activity: Apr 26, 2018, 12:02 PM
Last activity: Apr 26, 2018, 12:02 PM