awk & shell variables

From: Suhas (sgtembe_at_hotmail.com)
Date: 07/30/03


Date: 30 Jul 2003 14:26:48 -0700

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".

Thanks in advance.
Suhas



Relevant Pages

  • Re: Help with Error Handlers!!!
    ... I already knew that this syntax is incorrect. ... Bob Phillips ... Sub PasteReplaceNulls() ...
    (microsoft.public.excel.programming)
  • Re: renaming files in directory
    ... 39The syntax of the command is incorrect. ... Univ. of California, Berkeley ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Total transactions by month
    ... > Countas Qty" (Date is the DateFieldName) and receive an error ... > message "The syntax of the subquery in this expression in incorrect". ...
    (microsoft.public.access.queries)
  • RE: Shell script containing passwords.
    ... Subject: Shell script containing passwords. ... > Check the syntax for the .htaccess files in the httpd.conf file. ...
    (freebsd-questions)
  • Re: Search last name and first name combo box
    ... You said my syntax is incorrect. ... FROM qryName; ... BUT...you are now searching on an expression rather than on raw field data ...
    (microsoft.public.access.forms)