10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I have a backup report that unfortunately has some kind of hanging indent thing where the first line contains one column more than the others
I managed to get the output that I wanted using awk, but just wanting to know if there is short way of doing it using the same awk
Below is what... (2 Replies)
Discussion started by: newbie_01
2 Replies
2. UNIX for Advanced & Expert Users
I have a EBCDIC multi layout file which has a header record which is 21 bytes, The Detail records are 2427 bytes long and the trailer record is 9 bytes long.
Is there a command to remove the header as well as trailer record and read only the detail records while at the same time not altering... (1 Reply)
Discussion started by: abhilashnair
1 Replies
3. Shell Programming and Scripting
Hi Forum.
I'm struggling to find a solution for the following issue.
I have multiple files a1.txt, a2.txt, a3.txt, etc. and I would like to insert a tab-delimited header record at the beginning of each of the files.
This is my code so far but it's not working as expected.
for i in... (2 Replies)
Discussion started by: pchang
2 Replies
4. Shell Programming and Scripting
I have the following scenario where I need to use a header record from a file and generate a DML based off of it...
E.g.: The header can change periodically with an additional column in between or remove a col....
Sample header : (head -1 sample.txt)... (17 Replies)
Discussion started by: anduzzi
17 Replies
5. Shell Programming and Scripting
A header record is to be inserted in the begining of a flat file without using extra file or new file. It should be inserted into same file. Advace thanks for all help... (7 Replies)
Discussion started by: shreekrishnagd
7 Replies
6. Shell Programming and Scripting
Guys....
Got a scenario in which I need to skip parsing the header record while I do an awk.
Does awk has the flexibility to accomplish this?.
If so, how do we do this?.
Thanks !!!
-Anduzzi :) (2 Replies)
Discussion started by: anduzzi
2 Replies
7. UNIX for Dummies Questions & Answers
Hello,
after 9 months of archiving 1000 files,
now, i need to change the order of fields in the header record.
some very large, space padded files.
HEADERCAS05212008D0210DOMEST01(spacepadded to record length 210)
must now be
05212008HEADERCASD0210DOMEST01(spacepadded to record length 210)
... (1 Reply)
Discussion started by: JohnMario
1 Replies
8. Shell Programming and Scripting
I am using HP UX and think this may be done with awk but bot sure.
I have a file with a several header records and undeneath many detail records I need to put in the header record the number of detail records above this header record and number of detail records below this header record
Header... (5 Replies)
Discussion started by: klut
5 Replies
9. UNIX for Dummies Questions & Answers
All,
I have a task to search through several hundred files and extract duplicate detail records and keep them grouped with their header record. If no duplicate detail record exists, don't pull the header. For example, an input file could look like this:
input.txt
HA
D1
D2
D2
D3
D4
D4... (17 Replies)
Discussion started by: run_eim
17 Replies
10. Shell Programming and Scripting
Hi, I need to chope the header and footer record from an input file and make a new output file, please let me know how i can do it in unix.thanks. (4 Replies)
Discussion started by: coolbudy
4 Replies
DUMP(5) File Formats Manual DUMP(5)
NAME
dump, ddate - incremental dump format
SYNOPSIS
#include <sys/types.h>
#include <sys/ino.h>
# include <dumprestor.h>
DESCRIPTION
Tapes used by dump and restor(1) contain:
a header record
two groups of bit map records
a group of records describing directories
a group of records describing files
The format of the header record and of the first record of each description as given in the include file <dumprestor.h> is:
NTREC is the number of 512 byte records in a physical tape block. MLEN is the number of bits in a bit map word. MSIZ is the number of bit
map words.
The TS_ entries are used in the c_type field to indicate what sort of header this is. The types and their meanings are as follows:
TS_TAPE Tape volume label
TS_INODE
A file or directory follows. The c_dinode field is a copy of the disk inode and contains bits telling what sort of file this is.
TS_BITS A bit map follows. This bit map has a one bit for each inode that was dumped.
TS_ADDR A subrecord of a file description. See c_addr below.
TS_END End of tape record.
TS_CLRI A bit map follows. This bit map contains a zero bit for all inodes that were empty on the file system when dumped.
MAGIC All header records have this number in c_magic.
CHECKSUM
Header records checksum to this value.
The fields of the header structure are as follows:
c_type The type of the header.
c_date The date the dump was taken.
c_ddate The date the file system was dumped from.
c_volume The current volume number of the dump.
c_tapea The current number of this (512-byte) record.
c_inumber
The number of the inode being dumped if this is of type TS_INODE.
c_magic This contains the value MAGIC above, truncated as needed.
c_checksum
This contains whatever value is needed to make the record sum to CHECKSUM.
c_dinode This is a copy of the inode as it appears on the file system; see filsys(5).
c_count The count of characters in c_addr.
c_addr An array of characters describing the blocks of the dumped file. A character is zero if the block associated with that character
was not present on the file system, otherwise the character is non-zero. If the block was not present on the file system, no
block was dumped; the block will be restored as a hole in the file. If there is not sufficient space in this record to describe
all of the blocks in a file, TS_ADDR records will be scattered through the file, each one picking up where the last left off.
Each volume except the last ends with a tapemark (read as an end of file). The last volume ends with a TS_END record and then the tape-
mark.
The structure idates describes an entry of the file /etc/ddate where dump history is kept. The fields of the structure are:
id_name The dumped filesystem is `/dev/id_nam'.
id_incno The level number of the dump tape; see dump(1).
id_ddate The date of the incremental dump in system format see types(5).
FILES
/etc/ddate
SEE ALSO
dump(1), dumpdir(1), restor(1), filsys(5), types(5)
DUMP(5)