Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old November 19th, 2003, 01:59 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
File Name Format in Shell Script

Hi,

I am receiving a file as output of the execution of a shell script. It's name is in the format outlist.lst. However, I would like it to be of the format mmddyyyy24mmss.dat. How can I accomplish this? Any pointers would be greatly appreciated.

Thanks,
Sankar.

Reply With Quote
  #2  
Old December 4th, 2003, 02:03 AM
boogiemin boogiemin is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 9 boogiemin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: File Name Format in Shell Script

Is the shell script yours or are you receiving it from someone else? Do you have shell access?

Reply With Quote
  #3  
Old December 4th, 2003, 02:11 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: File Name Format in Shell Script

Well, you would need to look at the shell script and see where it is returning that name and modify it accordingly. If you want to post the _relevant_ (read: not all) code, we can look at it for you..

Reply With Quote
  #4  
Old December 5th, 2003, 09:51 AM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: File Name Format in Shell Script

substitute this string where the output file is defined (if you are able to do so)

DATE=`date +%m%d%Y%H%M%S.dat`
>$DATE

You can substitute $DATE, for what ever variable the script uses.

Hope this helps,
Eric

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > File Name Format in Shell Script


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway