![]() |
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 |
| Adding a date as a first column | figaro | UNIX for Dummies Questions & Answers | 2 | 05-21-2008 05:00 PM |
| adding or subtracting days in the o/p of date | St.Fartatric | UNIX for Dummies Questions & Answers | 1 | 05-19-2008 07:10 AM |
| Grabing Date from filename and adding to the end of each line in the file. | rkumar28 | Shell Programming and Scripting | 1 | 05-01-2007 08:25 PM |
| Formatting Date (adding a month) | devid | UNIX for Dummies Questions & Answers | 4 | 01-18-2006 10:31 AM |
| Adding command line env in cron env | abhijeetkul | Shell Programming and Scripting | 1 | 12-13-2005 09:42 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
The below works to make the logfile from a cron entry date specific:
00 11 * * * /scripts/scriptname.sh > /logs/log`date +%d%m%y`.log 2>&1 Or in the script: DATE_STAMP=` date +%Y%m%d` echo ${DATE_STAMP} -------------- FILE_NAME=file_${DATE_STAMP}.log do something > $FILE_NAME |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|