Date/Time Stamp


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Date/Time Stamp
# 1  
Old 11-14-2006
Date/Time Stamp

Hi All,

Wondering if there is have a date added at the end of a test string. I have a hypothetical text file day one:

John
Paul
George

When the file day one is output, I'd like it to read something like this:

John 101406
Paul 101406
George 101406

Day two, when the same text file is appended, I'd like to it to read something like this (never losing the original date stamps):

John 101406
Paul 101406
George 101406
Ringo 101506

I'm quite a UNIX novice. Any help would be greatly appreciated! Thanks all!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl:Script to append date and time stamp

Help with Perl script : I have a web.xml file with a line <display-name>some_text_here</display-name> Need to append the current date and time stamp to the string and save the XML file Something like <display-name>some_text_here._01_23_2014_03_56_33</display-name> -->Finally want... (5 Replies)
Discussion started by: gaurav99
5 Replies

2. Shell Programming and Scripting

Files with date and time stamp

Hi Folks, Need a clarification on files with date and time stamp. Here is my requirement. There is a file created everyday with the following format "file.txt.YYYYMMDDHHMMSS". Now i need to check for this file and if it is available then i need to do some task to the file. I tried... (6 Replies)
Discussion started by: jayadanabalan
6 Replies

3. Emergency UNIX and Linux Support

How to append date and time stamp before the two extensions?

hi, i have some file names. my file names are as follows: c_abc_new.txt.xls c_def.txt.xls i want to append date time stamp in the below manner. c_abc_new_YYYYMMDD_HH24MISS.txt.xls c_def_YYYYMMDD_HH24MISS.txt.xls check the two input file names, they differ in naming. the 1st file name... (9 Replies)
Discussion started by: Little
9 Replies

4. Shell Programming and Scripting

If(Condition) Rename a file with (Date+Time) Stamp

Hi! Please see our current script: #!/usr/bin/ksh if (egrep "This string is found in the log" /a01/bpm.log) then mailx -s "Error from log" me@email.com, him@email.com </a01/bpm.log fi To the above existing script, we need to add the following change: 1) After finding the string,... (7 Replies)
Discussion started by: atechcorp
7 Replies

5. Shell Programming and Scripting

Set date and time stamp of one file to another

Hi I use "touch -t xxxxxxxx" command to set date/time stamp of a file. My requirement is to read the date/time stamp of a file and apply it to another file. Is there anyway to do it simple instead of manually taking date/stamp of first file? TIA Prvn (2 Replies)
Discussion started by: prvnrk
2 Replies

6. Shell Programming and Scripting

append date time stamp via ftp script

I have searched several thread and not found my solution, so I am posting a new qustion. I have a very simple script on an AIX server that FTPs 2 files to a MS FTP server. These 2 files are created on the AIX server every hour, with a static name. I need to FTP the files to the MS server, but... (1 Reply)
Discussion started by: sknisely
1 Replies

7. UNIX for Advanced & Expert Users

rsync - date/time stamp

Hi, We are using RSYNC for syncing remote directories and working great. Our requirement is to have the destination files with date/time stamp of when they're copied on to the destination server, NOT the date/time stamps of source files/directories. As RSYNC, by default, preserving the same... (4 Replies)
Discussion started by: prvnrk
4 Replies

8. Shell Programming and Scripting

Insert Time and Date Stamp

I have a directory with following files in it ABC.000.DAT ABC.001.DAT ABC.002.DAT ABC.003.DAT I want to insert time and date stamp in file names like ABC.000.YYYYMMDDHHMM.DAT I able to insert the time and date stamp at the end of filename Kindly help (1 Reply)
Discussion started by: aajmani
1 Replies

9. Shell Programming and Scripting

Date Time Stamp

I'm trying to write a script that checks the DTS of a file the compares it to the current time. If greater that 60 mins has gone by and the file has not been written to alert. So far I have the time pulled from the file but I dont know how to compare the times against a 60 min difference. ... (2 Replies)
Discussion started by: jarich
2 Replies

10. UNIX for Dummies Questions & Answers

File date and time stamp

I have to capture the creation date and time stamp for a file. The ls command doesn't list all the required information. I need year, month, day, hour, minute and second. Any ideas... (1 Reply)
Discussion started by: Xenon
1 Replies
Login or Register to Ask a Question
CHEWMAIL(1)						User Contributed Perl Documentation					       CHEWMAIL(1)

NAME
chewmail - mail archiver SYNOPSIS
chewmail [OPTIONS] <MAILBOX> ... DESCRIPTION
chewmail is a program for archiving mail. It is inspired by the by the Python-based archivemail, but with more useful semantics. All mail is archived to the mailbox specified with the --output-box switch, in mbox format. It can read mailboxes in mbox, Maildir and MH formats. Internally, chewmail uses Mail::Box, so it support file names and URLs supported by that module. OPTIONS
-o mailbox-format, --output-box=mailbox-format The mailbox to archive messages to. The mailbox is run through the Date::Format module, so it supports all it's conversion specifiers. The date and time is relative to the messages timestamp, or the current time if the timestamp is impossible to determine. A sample of the conversion specifiers follows: %% PERCENT %b month abbr %B month %d numeric day of the month, with leading zeros (eg 01..31) %e numeric day of the month, without leading zeros (eg 1..31) %D MM/DD/YY %G GPS week number (weeks since January 6, 1980) %h month abbr %H hour, 24 hour clock, leading 0's) %I hour, 12 hour clock, leading 0's) %j day of the year %k hour %l hour, 12 hour clock %L month number, starting with 1 %m month number, starting with 01 %n NEWLINE %o ornate day of month -- "1st", "2nd", "25th", etc. %t TAB %U week number, Sunday as first day of week %w day of the week, numerically, Sunday == 0 %W week number, Monday as first day of week %x date format: 11/19/94 %y year (2 digits) %Y year (4 digits) -d days-old, --days=days-old Only archive messages older than than this many days. -D date, --date=date Only archive messages old than this date. The date can be any date understood by Perl's Date::Parse module. -R, --only-read Only archive messages that are marked seen or read. --delete-immediately Synchonize the mailboxes after every message is moved. This will be substantially slower but may provide better recovery for some mail- box formats in the event of a crash. --preserve-timestamp Preserve the atime and mtime of the input mailbox. This only affects file-based mailboxes, such as mbox. -n, --dry-run Go through all the motions of archiving the mail, but don't actually change any mailboxes. -v, --verbose Output more informational messages. Use multiple times for more verbosity. -q, --quiet Don't output any messages other than error messages. -V, --version Print the version number then exit. -h, --help Print usage information then exit. EXAMPLES
Archive two day old messages in inbox to inbox-old: chewmail --days 2 -o inbox-old inbox Archive read messages to a mailbox named the year-month of the message: chewmail --only-read -o %Y-%m inbox SEE ALSO
archivemail(1), Date::Parse, Date::Format, Mail::Box AUTHOR
Eric Dorland <eric@kuroneko.ca> perl v5.8.8 2006-08-15 CHEWMAIL(1)