![]() |
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 | 4 | 12-26-2007 08:59 AM |
| 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-27-2006 11:30 PM |
| 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 04:57 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||||
|
still not gettin the contents in file "dates"
------------------------------------------------------------- #!/bin/ksh a=`date +"%b-%d"` ps | grep root | grep $a >> dates -------------------------------------------------------------- these are the process : root 3694688 7503998 0 Nov 03 - 0:12 /usr/bin/iostat -d 30 root 7200814 7503998 0 Nov 03 - 0:08 ./ifstat 30 10 root 7209086 1 0 Jun 14 - 4:20 /usr/sbin/cron root 7503998 3117144 0 Nov 03 - 1:11 ./stat_daemon 9 root 7663756 7503998 0 Nov 03 - 2:10 ./nfs_stat AIX 30 ---------------------------------------------------------------------- can u tell me how to grep the process acording to the above dates . Actually i m able to create the file "dates" but its empty............. i think some problem lies in my script in a=`date +"%b-%d"` |
|
||||
|
Your command
a=`date +"%m-%d"` has a "-" between the month and the date, but you are trying to match it to something that has a space there. So a=`date +"%m %d"` should work. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|