Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 13 of 13
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11

    ps -ef
    does return
    root 5887 1 0 14:15 pts/2 00:00:00 /home/progress/91c/bin/_mprshut /home/database/custom -C watchdog

    I am runing ps as root and the shell script as root

  2. #12
    Linux Guru
    Join Date
    Mar 2003
    Dang! Well, it should work on the command line, so let's go thru it one line at a time...

    ps -ef |grep custom

    ps -ef | grep custom | awk '{print $8, $10}'

    It seems to me as though it should be working...
    Registered Linux user #346571
    "All The Dude ever wanted was his rug back" - The Dude

  3. #13
    yes at the command line both work, but in the shell script they don't..

    Actually I just figured it was the solution

    FIND_PROC=`ps -ef --columns 160 -ef |grep custom |awk '{if ($10~/watchdog/)print }'`
    echo "$FIND_PROC"

    adding the columns 160 allowed the awk to read pids longer than 80 characters.....

    Thanks for all your help

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts