<<< Date Index >>>     <<< Thread Index >>>

Re: jump to a message given by filename



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday, February 27 at 06:41 PM, quoth Nagyon Almos:
> Thank you very much for this script. (Hence I dont have to dig into 
> those  manuals...; Unfortunately the 822field can not be found in 
> Edgy Eft; I suppose grep -i ^message-id: |head -n 1 works too.)

A better idea:

awk '{if(tolower($0)~/^message-id: /){print $2;exit}}'

It's a better idea only because this way you don't need two programs 
to do the work of one. :)

A simpler, but slightly less generic one would be:

awk '/^[Mm]essage-[Ii][Dd]: /{print $2; exit}'

~Kyle
- -- 
Just because you do not take an interest in politics doesn't mean 
politics won't take an interest in you.
                                                  -- Pericles (430 BC)
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFF5HwwBkIOoMqOI14RAidNAJ41nOmcZ3iFslYmIYn8xrBznvnwxwCfSeDv
lJ3bzlh/8mV3ptKlXXL0yJM=
=kMEt
-----END PGP SIGNATURE-----