![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2 ftps in script, second won't go to output file | brdholman | UNIX for Dummies Questions & Answers | 4 | 11-15-2007 12:18 PM |
| compare file size from a output file from a script | moustik | Shell Programming and Scripting | 7 | 11-07-2007 07:17 AM |
| How to extract output from a script to .xls file | scriptlearner | Shell Programming and Scripting | 6 | 08-09-2007 11:34 PM |
| scp output fm script won't go to file | nmikes | Shell Programming and Scripting | 7 | 01-31-2007 03:53 PM |
| Output of script to a file | sumeet | UNIX for Advanced & Expert Users | 3 | 11-29-2006 09:12 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have a script that run every morning, but I need the output file to have the date in the name.
example: df -k > 01092005.log the bold part is what I need. I tried df -k >${DATE}.log but doesn't work. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
df -k > `date +%Y%m%d`.log |
|
#3
|
|||
|
|||
|
Quote:
date +%Y%m%d`.log I don't get the current day |
|
#4
|
|||
|
|||
|
Do you have the backticks? Try this to see what you are getting
Code:
var="`date +%Y%m%d`.log" echo $var |
|||
| Google The UNIX and Linux Forums |