On Mon, Dec 24, 2001 at 11:16:55AM -0600, dave brett <[EMAIL PROTECTED]> wrote:
| I was trying to find a process which was running.  Below is partial list
| of the processes showing it running.
| 
| My problem is when I pipe the process list to grep it does not find it.  I
| have tried with out the wild cards and quotes, with just the quotes, with
| out the quotes and wildcard.  no luck  what am i doing wrong?
| 
| dbrett    2620  0.0  1.3  6136 1652 ?        S    09:41   0:00
| //usr/X11R6/bin/realplay /tmp/b67wr7ef.ram
| dbrett    2621  0.0  1.3  6136 1652 ?        S    09:41   0:00
| //usr/X11R6/bin/realplay /tmp/b67wr7ef.ram
| dbrett    2623  0.0  8.9 42336 11344 ?       S    09:41   0:00
| //usr/X11R6/bin/realplay /tmp/b67wr7ef.ram
| dbrett    2631  0.0  3.6  8340 4576 ?        S    09:46   0:02
| 
| [dbrett@dbrett dbrett]$ ps -aux |grep -i "*real*"
| dbrett    2951  0.0  0.4  1728  592 pts/1    S    12:13   0:00 grep -i
| *real*

Well, regexp syntax is different to shell glob syntax.

In the shell, * means "0 or more characters".

In a regexp, * means "0 or more of the preceeding item" and is thus
illegal at the start of a regexp (no preceeding item there) - forgiving
programs may well treat it as a literal * there.

Try this

        ps ax | grep -i real

With grep the regexp does not need to match the whole line.

Also bear in mind that the ps command is ofteni, um, overly helpful -
it will crop long lines rather than display them. By including the "u"
option you may be cropping enough stuff to remove "realplay" from the
listing. Maybe.
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

Drive Agressively  Rash Magnificently   - Nankai Leathers



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to