The `openssl` command (specifically, its `openssl x509` subcommand, among others) is polite with its data stream: once it reads data, it doesn't read more than it needs. This allows to chain multiple `openssl` commands like this: while openssl x509 -noout -text; do :; done < cert-bundle.pem This will display all bundled certs in the file `cert-bundle.pem` (and end with an error: when there's no more input available, but that's just to show how it's working).