![]() |
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 |
| get current system date | wtolentino | UNIX for Dummies Questions & Answers | 5 | 07-30-2009 10:55 AM |
| calculate the date of next satureday of current date. | rinku | Shell Programming and Scripting | 3 | 09-02-2008 11:05 PM |
| Get date and time for past 1 hour from current date | spch2o | Shell Programming and Scripting | 5 | 08-29-2008 04:32 AM |
| Perl: Extracting date from file name and comparing with current date | MKNENI | Shell Programming and Scripting | 4 | 03-26-2008 04:01 PM |
| File date vs Current date | trexlim | Shell Programming and Scripting | 4 | 05-04-2007 09:35 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I am running a command to extract data from a database which has different text and dates (ex. 01/03/07, 05/29/08, 06/05/08). Once the file is created I need to grep for all the text with a current date then redirect the sorted data to another file then email the file out. Here is what I have right now. My question is how could I incorporate the date command to only output the current date automatically?
awk '{print $1 $2 $3 $4 $5}'|egrep 05/29/08 $MYHOME/all.sched > $MYHOME/all.scheda more $MYHOME/all.scheda|mail -s "scheda" xxxxxx@xxxx.com < $MYHOME/all.scheda OUTPUT: servera schedule_1126 bob 05/29/08 serverb schedule_703 bob 05/29/08 serverc schedule_FRI2 mary 05/29/08 serverd schedule_FRI2 jane 05/29/08 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|