Grep Command
some examples of grep command:
* Print Apache’s documentroot directory name:
$ grep -i documentroot /etc/httpd/conf/httpd.conf
* View file contents without comments and empty lines:
$ grep -Ev “^$|^#” /etc/my.cnf
* print only IP address assigned to the interface:
$ ifconfig eth0 | grep ‘inet addr:’ | cut -d’:’ -f2 | awk […]
Recent Comments