Read a date value from other file.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Read a date value from other file.
# 1  
Old 07-14-2008
Read a date value from other file.

My Situation is

I have to read a date value from previuosly created file and need to increment the date in the newly created file. I need unix scripting for the above condtion.

Thanx in advance.

Last edited by chilli_taste; 07-14-2008 at 08:52 PM.. Reason: adding more words to be meaningful.
# 2  
Old 07-14-2008
Nice homeworkSmilie
Please read https://www.unix.com/unix-dummies-que...om-forums.html before posting, especially 5 and 6.
# 3  
Old 07-14-2008
for your kind information... its not a homework. I work in a corporate company where I work on Informatica with unix OS. As I am new to unix scripting..I have brought this question to the forum. It may be simple...yet unsolved puzzle to me. If you could suggest me with good idea that will be appreciable.
# 4  
Old 07-14-2008
"Date and time" calculation is not a simple puzzle and the solution depend on your "Unix" like OS.
School homework or a work related homework are the same and whoever ask you to solve this puzzle try to test your knowledge.
Anyway the title of the thread don't reflect the real problem.
Please read the rules, search the forum for previous solution and if you are unable to solve the puzzle , start a new thread and post a sample data.

Regards,

PS : We are not here to solve your problems, we can help however you should solve your problem by yourself.

Last edited by danmero; 07-14-2008 at 09:57 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Read file name based on date

Hi, I have file name as Example extract_ces_v3_p044444rlt_20160514045705.txt.pgp extract_ces_v3_p044444rlt_20160614049705.txt.pgp extract_ces_v3_p044444rlt_20160714046705.txt.pgp I have to read file name based on date(i.e) files with same date and copy to another directory in shell script.... (3 Replies)
Discussion started by: caba_jones
3 Replies

2. Shell Programming and Scripting

Read latest file name with a date and time and then download from FTP

Hi All, Please help. I have requirement to read the file / folder based on the latest date and download the file and folder. There will be files and folders in the location like 20140630-144422 20140630-144422.csv 20140707-182653 20140707-182653.csv 20140710-183153... (7 Replies)
Discussion started by: Praveen Pandit
7 Replies

3. Shell Programming and Scripting

Want it to read the file name and then append date stamp at the end of file?

I was thinking something like for i in `find . -name "*.log.Z"`; do mv $i name.log.Z or something like that? (3 Replies)
Discussion started by: xgringo
3 Replies

4. Shell Programming and Scripting

Script To read Date and count from files

Smaple 1 Date and Time: 2013-05-11 12:23:12 MST abc,1234,hi-all,45354-88888,IN,US XYZ,1234,hi-all,45354-88888,OUT,GB abc,1234,hi-all,45354-88888,IN,AS abc,1234,hi-all,45354-88888,OUT,US abc,1234,hi-all,45354-88888,IN,US Number of Records: 000005 Sample 2 HDR: 20130511... (1 Reply)
Discussion started by: Abhisrajput
1 Replies

5. UNIX for Dummies Questions & Answers

When reading a csv file, counter to read 20 lines and wait for minute then read next 20 till end

Hello All, i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file. Any inputs are appreciated ... (3 Replies)
Discussion started by: victor.s
3 Replies

6. Shell Programming and Scripting

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each certificate and send the mail to the user. The user takes action to add the new certificate to the storage file and user owns the responsibility to update the input text file with the new certificate... (5 Replies)
Discussion started by: casmo
5 Replies

7. Shell Programming and Scripting

How to pass a date read from database to the shell script?

Hi i have a database table which i will query in a sqlplus session and it will either come back with a date or null? Now, what i want to do is based on the date returned i will either abort or continue with the script execution. I need to know is there a way other than spooling the date... (4 Replies)
Discussion started by: vinoo128
4 Replies

8. Programming

Cannot read a file with read(fd, buffer, buffersize) function

# include <stdio.h> # include <fcntl.h> # include <stdlib.h> # include <sys/stat.h> int main(int argc, char *argv) { int fRead, fPadded, padVal; int btRead; int BUFFSIZE = 512; char buff; if (argc != 4) { printf ("Please provide all of the... (3 Replies)
Discussion started by: naranja18she
3 Replies

9. Shell Programming and Scripting

Delete files older than 3 months.(read date from the name of the file)

Guys, My log files stored in the date format format below(log_20080714072942): TIMESTAMP=`date +%Y%m%d%H%M%S` LOG=/log/log_${TIMESTAMP}.log I'm looking for a shell script which deletes all files which is older than 3 months from today. Regards, Bhagat (3 Replies)
Discussion started by: bhagat.singh-j
3 Replies

10. Shell Programming and Scripting

how to read i-node informations (date of creation)

Hi, I'm looking for a way to get the date of creation for a file. Is it possible ? I know that these informations are in the i-node but I don't know how to access them (if the 'find' command can do it with option -ctime, I have reasons to believe in it). Thanks for helping me ! (1 Reply)
Discussion started by: mullmafr
1 Replies
Login or Register to Ask a Question