I have this string
extension_dir => /some/path/php/extensions/no-debug-non-zts-20160303 => /some/path/php/extensions/no-debug-non-zts-20160303 sqlite3.extension_dir => no value => no value
which is the output of
php -i | grep extension_dir.
How can I parse it in bash to get the first
So far I have tried:
echo $(php -i | grep extension_dir | sed 's/extension_dir => //g' | sed 's/=> .*//g')
but that gives me
/some/path/php/extensions/no-debug-non-zts-20160303 sqlite3.no value. I have no idea why it doesn't replace all matches of
My base idea is to get rid of first
extension_dir => and than rid of everything after first
=> Probably sed matches things differently than regex.