-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2021-04-06 at 00:40 +0200, David Haller wrote:
Hello,
On Mon, 05 Apr 2021, Carlos E. R. wrote:
grepmail -h ^Message-[Ii][dD].*"$MSGID" ~/Mail/_Lists/_filed/os-en.2007*
What can I do so that the $ inside the $MSGID content is passed to grepmail and not interpreted as a variable start? Do I need to do text substitution first inside $MSGID, replacing '$' with '\$'? Is there some other way?
$ grepmail -h "^Message-[Ii][Dd].*${MSGID//$/\\$}" \ ~/Mail/_Lists/_filed/os-en.2007*
I don't understand how, but it works :-D [...] Huh, it fails on these (that mc finds, manually): Message-ID: <006501c7b50e$77cc3630$6764a290$@com> Message-ID: <2md$yDk+qZbGFwuq@dev.null.davjam.org> Message-Id: <8993-Fri29Jun2007142734+0100-jpff@codemist.co.uk> and a few others that seem similar. :-? Pine.LNX.4.64.0706071117040.15609@nimrodel.valinor not found 4673A349.5030701@gmx.net not found 4179-Mon04Jun2007071608+0100-jpff@codemist.co.uk not found 7281-Sat16Jun2007102117+0100-jpff@codemist.co.uk not found '027801c7b544$c5202410$4f606c30$@com' not found 7281-Fri22Jun2007074841+0100-jpff@codemist.co.uk not found 200706012133.01430.thadeurj@terra.com.br not found 4300-Fri29Jun2007145048+0100-jpff@codemist.co.uk not found '003801c7a6d3$70740370$515c0a50$@com' not found 20070616184124.GF19067@blinkenlights.visv.net not found 00cc01c7ba6b$1ace4060$506ac120$@co.cr not found 7277-Tue26Jun2007205907+0100-jpff@codemist.co.uk not found Pine.LNX.4.64.0706251153151.14573@nimrodel.valinor not found 6647-Mon11Jun2007214515+0100-jpff@codemist.co.uk not found 000001c7b380$a5f1edf0$f1d5c9d0$@com not found 200706071153.50160.wstephenson@suse.de not found JM200706162234065.4685828@pop.707.to not found the script is still running, there may be a few more. - -- Cheers, Carlos E. R. (from openSUSE 15.2 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCYGukWhwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVC2wAnj1ENtse+uyCFLVc7Hfe s8gHjd1UAKCWo+wkdYYNqfHCOFOKogvXhNT/gA== =7NY+ -----END PGP SIGNATURE-----