Need a script to Append date to generated .txt file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need a script to Append date to generated .txt file
# 1  
Old 08-01-2006
Need a script to Append date to generated .txt file

Hi,

Can anyone plz share their experience with -

Building shell script to append the file with date in following format-

Filename_MMDDYYYY.txt

Thanks in advance
# 2  
Old 08-01-2006
search forums

First thing should be to search the forums. See this
# 3  
Old 08-01-2006
WOW thankyou soooooooooooooo very much. Thanks . Thanks again. I didnt knew this. You are sooooooooooo brilliant. Thankyou for your answer SIR.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Append date to an executing script

This works except the date being sent to this script. Is it because I am trying to write to an executing script? Is there a better way? date '+%m-%d-%Y_%I:%M-%p'>> Send_Email.sh CONTENT="Backup to Maxtor Drive has occured." echo "Sending email." /usr/sbin/ssmtp -t << EOF To:... (1 Reply)
Discussion started by: drew77
1 Replies

2. Shell Programming and Scripting

Append date to sql*plus spool (log) file in shell script

SQL*Plus version : 11.2.0.4 OS : Oracle Linux 6.5 SQL*Plus is a client application to connect to oracle database. The log file for this tool is generated via spool command as shown below. I am trying to append date ( $dateString ) to spool file as shown below. $ cat test2.sh #!/bin/bash... (4 Replies)
Discussion started by: kraljic
4 Replies

3. Shell Programming and Scripting

Need to append the date | abcddate.txt to the first line of my txt file

I want to add/append the info in the following format to my.txt file. 20130702|abcd20130702.txt FN|SN|DOB I tried the below script but it throws me some exceptions. <#!/bin/sh dt = date '+%y%m%d'members; echo $dt+|+members+$dt; /usr/bin/awk -f BEGIN { FS="|"; OFS="|"; } { print... (6 Replies)
Discussion started by: harik1982
6 Replies

4. UNIX for Advanced & Expert Users

Script to rename file that was generated today and which starts with date

hello, can someone please suggest a script to rename a file that was generated today and filename that being generated daily starts with date, its a xml file. here is example. # find . -type f -mtime -1 ./20130529_4995733057260357019.xml # this finename should be renamed to this format.... (6 Replies)
Discussion started by: bobby320
6 Replies

5. Shell Programming and Scripting

Delete log files content older than 30 days and append the lastest date log file date

To delete log files content older than 30 days and append the lastest date log file date in the respective logs I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs This is my script cd... (2 Replies)
Discussion started by: sreekumarhari
2 Replies

6. Shell Programming and Scripting

awk append fileA.txt to growing file B.txt

This is appending a column. My question is fairly simple. I have a program generating data in a form like so: 1 20 2 22 3 23 4 12 5 43 For ever iteration I'm generating this data. I have the basic idea with cut -f 2 fileA.txt | paste -d >> FileB.txt ???? I want FileB.txt to grow, and... (4 Replies)
Discussion started by: theawknewbie
4 Replies

7. Shell Programming and Scripting

Help with selecting column with awk for a txt file generated by excel

I am new to scripting/programming, so I apologize for any novice questions. I have a tab delimited text file that was saved from excel xls file. I am trying to select only the third column using awk command. My command line is as below: cat test.txt | awk '{print $3}' However, above... (8 Replies)
Discussion started by: SangLad
8 Replies

8. UNIX for Dummies Questions & Answers

append file name with date

Hi guys, I created a very basic script that moves a specified file to a directory that I have set using the mv command. What I would like to do is append the file name with the date and time. So if I was to use the script to move a file called abc.txt, the script should rename the file... (1 Reply)
Discussion started by: jjc
1 Replies

9. Shell Programming and Scripting

how to create file.txt and add current date in file content

Hey guy, how to make bash script to create foo.txt file and add current date into file content and that file always append. example: today the script run and add today date into content foo.txt and tomorrow the script will run and add tomorrow date in content foo.txt without remove today... (3 Replies)
Discussion started by: chenboly
3 Replies

10. Shell Programming and Scripting

append date to file

Hi I need to append date to filename.Wrote script to get the date from table ,take this date filed and append to my i/p file when call the below script.Any help should be appreciated . Exampel If call the below script a4.sh filename o/p should be filename.2008-02-29 .... (6 Replies)
Discussion started by: mohan705
6 Replies
Login or Register to Ask a Question