David G. Miller wrote: > Why use sed? How about: > > cat file | head --lines=-3 | awk '{if (/-----BEGIN PGP SIGNATURE-----/) > exit; print $0;}' > > The head --lines=-3 prints the file after skipping the first three > lines. Skipping the first three lines isn't reliable as a PGP message may contain more or less lines after the -----BEGIN PGP MESSAGE-----, there might be no Hash: header, could be multiple Comment: headers, etc. It would work in the specific case Dan asked about though. -- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp ====================================================================== Victory is Mine! -- Stewie Griffin
Attachment:
pgpkrwyyoPqEN.pgp
Description: PGP signature