Is it possible to return multiple next word results using a single sed query
String:
profile string.www.com { app-service none cert string.www.com_2018_2020.crt cert-key-chain { string.www.com _2018_2020_geotrust_rsa_ca_2018 { cert string.www.com _2018_2020.crt chain geotrust_rsa_ca_2018.crt key string.www.com_2018_2020.key } } chain geotrust_rsa_ca_2018.crt defaults-from default-clientssl inherit-certkeychain false key string.www.com_2018_2020.key passphrase none }
So for instance something like:
sed -n 's/^.*\(profile \|defaults-from \| passphrase) \([^ ]*\).*/\1/p'
Would return:
string.www.com
default-clientssl
none