Check this out.
# ps -aux | grep tail root 19775 0.1 0.2 968 656 pts/3 S 17:07:27 0:00 grep tail root 3030 0.0 0.2 1008 696 pts/4 S 10:23:21 0:00 tail -f /va +r/adm/dd # ps -aux | grep 't\ail' root 3030 0.0 0.2 1008 696 pts/4 S 10:23:21 0:00 tail -f /va +r/adm/dd
Update: I like petral's way.
First time I saw this I thought it was a typo. ;) Pick a character that doesn't have special meaning to grep when '\' is used before it.
or # ps -aux | grep '(httpd|named)' | grep -v grep or #!/usr/bin/perl @ps = qx(ps aux); @httpd = grep {/httpd/} @ps; @named = grep {/named/} @ps; print "httpd's:\n\t", join("\n\t", @httpd), "\nnamed's:\n\t", join("\n\t", @named), "\n";
In reply to Re: Searching strings within an array for a particular word.
by zengargoyle
in thread Searching strings within an array for a particular word.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |