I\'m running Ubuntu 18.04 LTS. I have a text file named \"group_keys\", which contains a number of public keys that I\'d like to split based on the delimiter
---
This should work:
awk '/-----BEGIN PUBLIC KEY-----?/{n++}{print > "person_" n "_key" }' group_keys