Sponsored Content
Full Discussion: Change File Header Timestamp
Top Forums Shell Programming and Scripting Change File Header Timestamp Post 302265429 by mudi on Sunday 7th of December 2008 11:01:26 AM
Old 12-07-2008
Sorry I forgot to mention the date in the header record is in dd-mmm-yyyy format e.g. 12-Sep-2008 and there are data records which contain date in the format dd-mm-yyyy e.g. 21-07-2005. So I need to change the date in the header record only.

from:
SDM|PRDHIER|12-Sep-2008|12:00||
CDBCIN|1012348318|C5C18GB|CIS|CIN|21-07-2005
CDBCIN|1012348381|Z3WA3GB|CIS|CIN|31-12-2007
CDBCIN|1012348407|CBFTVGB|CIS|CIN|26-02-2007
CDBCIN|1012348416|CZQO4GB|CIS|CIN|30-03-2006

to:
SDM|PRDHIER|07-Dec-2008|12:00||
CDBCIN|1012348318|C5C18GB|CIS|CIN|21-07-2005
CDBCIN|1012348381|Z3WA3GB|CIS|CIN|31-12-2007
CDBCIN|1012348407|CBFTVGB|CIS|CIN|26-02-2007
CDBCIN|1012348416|CZQO4GB|CIS|CIN|30-03-2006

i.e. only the header record and the rest remains the same.

Thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Timestamp of File permission change

Hi!! Experts, Is there any way to find the timestamp when the permission of a file was modified?? I mean no change to file contents.. Just the chnage of permissions. :) (1 Reply)
Discussion started by: jyotipg
1 Replies

2. HP-UX

change timestamp of file

Hi, How I change the timestamp of file to some past date Let's say I have this file -rw-r--r-- 1 oracle dba 16587 Apr 11 10:46 create_dev.sql And I want to change the timestamp to Mar 10th 7:45 PM So it should appear like this: -rw-r--r-- 1 oracle dba ... (1 Reply)
Discussion started by: isingh786
1 Replies

3. UNIX for Dummies Questions & Answers

move file change timestamp

Hello, Alright solution: I need to move files to a backup folder, changing the datestamp to the current day so that the file stays in the backup folder for the full 30 days before another script removes it. Obviously, any file I move in will preserve the timestamp which is what I *don't* want.... (2 Replies)
Discussion started by: tekster757
2 Replies

4. Linux

Reading the header of a tar file(posix header)

say i have these many file in a directory named exam. 1)/exam/newfolder/link.txt. 2)/exam/newfolder1/ and i create a tar say exam.tar well the problem is, when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories. on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies

5. AIX

Change a file's timestamp

Hi, I want to modify a file and then change the file's timestamp back to what it was before the modification. It should look as if the file has'nt been modifed. The entire operation needs to be done inside a ksh script. Can anyone suggest how I can trap a file's stamp in a variable within a... (6 Replies)
Discussion started by: shibajighosh
6 Replies

6. Shell Programming and Scripting

Trying to change header date of a file

Hi, I am trying to write a code for changing header date of a file with a date of 6 month back. Below is the header date on which I am working - 20080531 I want to change it as 20071130 Please suggest me in the way like ,I can change any date in a file with date of 6 months back. ... (9 Replies)
Discussion started by: Monalisa
9 Replies

7. Shell Programming and Scripting

Getting a relative timestamp from timestamp stored in a file

Hi, I've a file in the following format 1999-APR-8 17:31:06 1500 3 45 1999-APR-8 17:31:15 1500 3 45 1999-APR-8 17:31:25 1500 3 45 1999-APR-8 17:31:30 1500 3 45 1999-APR-8 17:31:55 1500 3 45 1999-APR-8 17:32:06 1500 3 ... (1 Reply)
Discussion started by: vaibhavkorde
1 Replies

8. UNIX for Dummies Questions & Answers

How to compare a file by its timestamp and store in a different location whenever timestamp changes?

Hi All, I am new to unix programming. I am trying for a requirement and the requirement goes like this..... I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies

9. Shell Programming and Scripting

writing the timestamp to as a header in a file

hello mates, this is my first post. please help me out. i have got a file with some data in it. i am asked to write the timestamp as a header for that file. i mean the time the file created should be mentioned at the top of the file. i know we can use sed to insert a sentence but... (6 Replies)
Discussion started by: jdsony
6 Replies

10. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
PCCARD(4)						   BSD Kernel Interfaces Manual 						 PCCARD(4)

NAME
pccard -- PC Card bus driver SYNOPSIS
device pccard DESCRIPTION
The pccard driver implements the PC Card bus. The pccard driver supports all PC Card bridges in the system. TUNABLES
The driver supports the following tunable parameters, which may be added to /boot/loader.conf or set via the sysctl(8) command: hw.pccard.debug Non-zero values cause more verbose information to be printed when a 16-bit PC Card is inserted or removed. hw.pccard.cis_debug Non-zero value causes the CIS parsing of the 16-bit PC Card to be much more verbose and include a complete CIS dump. FILES
/dev/pccard0.cis This exclusive-use device will report all the CIS chains present in a PC Card, if a 16-bit PC Card is inserted in the slot. Only one user at a time may access the CIS. The CIS is presented as the relevant byte stream from the PC Card. For CIS tuples in Attribute Memory (the default), only the even locations are presented (the ODD locations are undefined per the standard). For CIS tuples in Common Memory, every byte is presented to the user. Decoding of the CIS tuples is done via a userland program. All tuples are presented to the user. SEE ALSO
cardbus(4), pccbb(4) PC Card Standard, Release 8. BSD
July 9, 2002 BSD
All times are GMT -4. The time now is 06:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy