The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Changing Creation Date to a Prespecified Date of a File In Unix monkfan UNIX for Dummies Questions & Answers 4 11-28-2006 07:15 AM
Displaying file names before a particular creation date dhruv_saksena UNIX for Dummies Questions & Answers 1 09-02-2005 08:19 AM
file creation date & time alisevA3 UNIX for Dummies Questions & Answers 3 07-08-2005 05:21 AM
file creation date including seconds krishna UNIX for Advanced & Expert Users 7 08-26-2002 08:45 AM
Converting the File Creation Date to a new format barney_clough UNIX for Dummies Questions & Answers 1 06-12-2002 07:43 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-19-2006
pankajkrmishra pankajkrmishra is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 55
Creation of log file under dynamic date folder

HI

I want to create a date folder and then a log file under it, which will hold all output of shell script. Say shell script abc.sh runs every day and I want to redirect the output of abc.sh > /opt/bea/wls81/Pkmtest/$(date +%Y%m%d)/ant.log.

Here date should always change according to system date and else everything should remain same.

Thanks

Pankaj
  #2 (permalink)  
Old 09-19-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
So what exactly is the problem? Looks like you know how to create the directory (the date command that you've given in your post is fine)...
  #3 (permalink)  
Old 09-19-2006
Andrek Andrek is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 122
Is it not easier to have all the log files under the one directory and tag the date to the log file name? Otherwise you will end up with 365 directories all containg only one file of the same name? A little trouble some if you need to check back throgh history and look at put put details... etc etc

ie
abc.sh > /opt/bea/wls81/Pkmtest/logs/ant_$(date +%Y%m%d).log
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:39 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0