rackerlabs/ohai-plugins — pull request #25 by calebgroom (2014-01-21 18:14:35+00:00)
Title: Add -E arg to grep when using regex

On Ubuntu 12.04 I have an error:

```
root@master:~# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/apc.sd' - /usr/lib/php5/20090626/apc.sd: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.3.10-1ubuntu3.9 with Suhosin-Patch (cli) (built: Dec 12 2013 04:27:25)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
```

However, if I used the current command, the error isn't trapped:

```
root@master:~# php -v 2>&1 | grep '[wW]arning|[Ee]rror'
root@master:~#
```

Adding -E matches:
```
root@master:~# php -v 2>&1 | grep -E '[wW]arning|[Ee]rror'
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/apc.sd' - /usr/lib/php5/20090626/apc.sd: cannot open shared object file: No such file or directory in Unknown on line 0
```