Re: awk & shell variables
From: erybak (ehudrybak_at_yahoo.com)
Date: 07/31/03
- Next message: erybak: "Re: test"
- Previous message: Joe Halpin: "Re: check file"
- In reply to: Suhas: "awk & shell variables"
- Next in thread: Ed Morton: "Re: awk & shell variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Jul 2003 07:52:39 -0700
sgtembe@hotmail.com (Suhas) wrote in message news:<5c440ee2.0307301326.a5ae28@posting.google.com>...
> Hello Everyone,
>
> Here is what I am trying to do & maybe you guys can throw some light,
> since I am not able to figure it out. I have shell script that
> contains the following:
>
> DB_DIR=/test/data
> DB_NAME=custom
> UID=root
>
> ps -ef | awk '$1 == "'"${UID}"'" && $9 ~ /_mprosrv
> "'"${DB_DIR}"'"'/'"'"${DB_NAME}"'"/'
>
> # I know that the above syntax is incorrect, since I am getting
> errors.
>
> Basically, I am trying to check for a process that has the UID (1st
> column) as "root" & the 9th column contains "_mprosrv
> /test/data/custom".
ps -ef | grep root | egrep "_mprosrv /test/data/custom"
Or you can user a regex inside the " " after egrep.
>
> Thanks in advance.
> Suhas
- Next message: erybak: "Re: test"
- Previous message: Joe Halpin: "Re: check file"
- In reply to: Suhas: "awk & shell variables"
- Next in thread: Ed Morton: "Re: awk & shell variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|