I'm trying to extract the text in second column of multiple line command output.
The command shows an output like this.
Nginx configuration wp basic (enabled)
PHP Version 7.0
HHVM disabled
SSL enabled
SSL PROVIDER Lets Encrypt
SSL EXPIRY DATE Wed Apr 11 06:29:29 UTC 2018
access_log /var/www/website.com/logs/access.log
error_log /var/www/website.com/logs/error.log
Webroot /var/www/website.com
DB_NAME certainDBName
DB_USER certainDBUser
DB_PASS passwordString
I want to read the DB_PASS
line from command output and extract the passwordString
to a variable, directly from my first command output without writing to a file.