![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| grep using date format | ali560045 | Shell Programming and Scripting | 8 | 12-11-2007 06:39 PM |
| date issue-find prevoius date in a patricular format | bsandeep_80 | UNIX for Advanced & Expert Users | 3 | 11-15-2007 08:42 PM |
| convert mmddyy date format to ccyyddd format?? | Bhups | Shell Programming and Scripting | 2 | 09-28-2006 12:30 AM |
| Date format: | Khoomfire | UNIX for Advanced & Expert Users | 1 | 02-13-2006 09:44 AM |
| date format | big123456 | Shell Programming and Scripting | 2 | 07-22-2005 05:57 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I didn't Understand what you mean above date format. Do you mean
Mount Day - hour:second. What about the other date format that you don't want to catch in your ps -ef command. Besides that you can not use date in this example date means todays date. if you send your ps -ef command's output which shows the date format that you want to catch and also the ones you dont want to catch together we can find the solution |
|
|||||
|
Your requirements are somewhat unclear. If you want to capture the date in the
format outputted by ps, here is one way of doing it. Create a file (e.g. date.awk) containing the following lines Code:
/java/ && /DBSyncController/ { print $5, $6 }
/java/ && /DBSyncControllerRerun/ { print $5, $6 }
/java/ && /Archiver1/ { print $5, $6 }
/java/ && /DBSyncListener/ { print $5, $6 }
/java/ && /Archiver2/ { print $5, $6 }
/java/ && /Cleaner1/ { print $5, $6 }
/java/ && /Interpolation/ { print $5, $6 }
Code:
ps -aef | awk -f date.awk >> dates |
|
||||
|
outputs of ps are columns of strings,parameters. You can not use date as you intend, you must use a way like fmurphys. Firts send all or a sample part of output oF ps -ef with no grep " I mean ps -ef " . Point out our underline the lines that you want. After this say what will you do with this output. Then I thing the solution will be simple
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|