10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
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
3. UNIX for Advanced & Expert Users
Hi,
I have a log file which contains lines like below:
2010-07-19 07:13:19,021 ERROR system ...(text)
2010-07-19 07:22:03,427 ERROR system ...(text)
class com... (text)
2010-07-19 07:23:19,026 ERROR system ...(text)
class com... (text)
each line is a separate line... I am given the a... (11 Replies)
Discussion started by: a27wang
11 Replies
4. UNIX for Advanced & Expert Users
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
5. UNIX for Dummies Questions & Answers
Hi,
I need to zip the list of files using from date Stamp to end date Stamp, How can I filter and make FromDate_EndDate.gzip?
any idea? (1 Reply)
Discussion started by: redlotus72
1 Replies
6. UNIX for Dummies Questions & Answers
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... (0 Replies)
Discussion started by: JimmyFlip
0 Replies
7. Shell Programming and Scripting
Dear Gurus,
I'm trying to move a number of files from one directory to another directory with a new date stamp. This is my script:
#! /bin/csh
Today_Date=`date +%Y%M%D`
mv /usr/TRS/data/TS* /usr/TRS/backup/TS*.${Today_Date}
when i run the script i'm getting the following errors:
mv:... (14 Replies)
Discussion started by: lweegp
14 Replies
8. Shell Programming and Scripting
I need to move files after midnight but attach the previous date to it.
Moving files before midnight no proproblem but how can I move files which are created on the 22nd for example but add a date stamp of previous day?
Date ='date +"Y%m%d"' gets today's date but how can I get yesterday's... (3 Replies)
Discussion started by: candle_66
3 Replies
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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