![](https://seccdn.libravatar.org/avatar/77cb4da5f72bc176182dcc33f03a18f3.jpg?s=120&d=mm&r=g)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2021-04-06 at 01:00 +0200, Bernhard Voelker wrote:
On 4/5/21 11:50 PM, Carlos E. R. wrote:
grep -i "f4sjvj$1p6$1@sea.gmane.org" ~/Mail/_Lists/_filed/os-en.200705..08 __________^__________________________"
1. As you have put the pattern in double quotes, the shell will try to expand the variables $1p6 and $1, and - as they're probably not defined - therefore pass the pattern 'f4sjvj@sea.gmane.org' to grep(1). --> use single quotes ''
2. As you pass something with a '$' in the pattern, but that is a special character matching the end of a line, you need to tell grep(1) to take the whole pattern as literal string: --> use the -F option.
$ grep -Fi 'f4sjvj$1p6$1@sea.gmane.org' ~/Mail/_Lists/_filed/os-en.200705..08
Ah... Unfortunately, grepmail doesn't have that option, and I do have to use grepmail. grep -F, --fixed-strings Interpret PATTERN as a list of fixed strings (instead of regular expressions), separated by newlines, any of which is to be matched. grepmail -f Obtain patterns from FILE, one per line. The empty file contains zero patterns, and therefore matches nothing. -F Force grepmail to process all files and streams as though they were mailboxes. (i.e. Skip checks for non-mailbox ASCII files or binary files that don't look like they are compressed using known schemes.) - -- Cheers, Carlos E. R. (from openSUSE 15.2 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCYGumLhwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVQSkAnAteZncOx5ubDJIWhrET Pp7OIsvqAKCXMg8RWOfZDP0pwHmc1iLKNE3YNw== =1lFe -----END PGP SIGNATURE-----