I have file format like below and I'm trying to modify this file.
I need to add 'ENDEND' end of each record.
01 ASH01 1CTCTL EDPPOO STAND
01 ASH08 0020 A1TH 101
01 ASH09 0022 A1TH 102
01 ASH09 0022 A1TH 103
01 ASH02 2CTCTL ... (5 Replies)
I need a script for...
how to find a position of column data and print some string in the next line and same position
position should find based on *HEADER8* in text
for ex: ord123 abs 123 987HEADER89 test234
ord124 abc 124 987HEADER88 test235
... (1 Reply)
Hi,
I am a newbie in unix programming so maybe this is a simple question.
I would like to know how can I make a script that outputs only the values that are not between any given start and end positions
Example
file1:
2 30
40 80
82 100
file2:
ID1 1
ID2 35
ID3 80
ID4 81
ID6... (9 Replies)
hi,
I have a file which consists of some records:
2010_06_4010093_001_001|10|ABCDEFGH|9|4010093||0040400||31.12.2009|S|O|X||||20100602093851-31.12.2009|XXBBFC|EFG||||00001|
2010_06_4010162_001_001|11|ABCDEFGH|9|4010162||0040400||31.12.2009|S|O|X||||20100602093851-31.12.2009|XXBBFC|EFG||||00002|... (11 Replies)
I want to remove text from nth position to nth position couple of times in same line
my line is
"hello is there anyone can help me with this question"
I need like this
ello is there anyone can help me with question
'h' is removed and 'this' removed from the line. I want to do this... (5 Replies)
Hi All,
I have a file that I would like to search for data and replace other data by record position number:
Example search..
search for "CLARK KENT" and replace Amt data "000025" with "000155"???
I'm able to search and replace unique data but, came to a stump when wanting to replace data... (11 Replies)
Dear Team,
Can any body help me out to get the filed position of the records post sorting using AWK programming.
Thanks in advance
Example Input:
StudentID col-1 col-2 col-3 col-4
1234 14 10 12 13
1235 10 11 12 13
1236 13 12 11 10 ... (3 Replies)
hi guys,
i want command or script to display the content of file from 2nd position to last but one position of a file
abcdefghdasdasdsd
123,345,678,345,323
434,656,656,656,656
678,878,878,989,545
4565656667,65656
i want to display the same above file without first and... (2 Replies)
Hi,
I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Hi All,
I wanted a sed/awk command to add a value/character on a particular position without disturbing the position of other characters.
I have file a.txt
OL 10031 Day Black Midi Good Value P01 P07
OL 10031 Day Black Short Good Value P01 P07
I want to get the output as... (2 Replies)
Discussion started by: rahulsk
2 Replies
LEARN ABOUT DEBIAN
cdb
cdb(5) File Formats Manual cdb(5)NAME
cdb - Constant DataBase file format
DESCRIPTION
A cdb database is a single file used to map `keys' to `values', having records of (key,value) pairs. File consists of 3 parts: toc (table
of contents), data and index (hash tables).
Toc has fixed length of 2048 bytes, containing 256 pointers to hash tables inside index sections. Every pointer consists of position of a
hash table in bytes from the beginning of a file, and a size of a hash table in entries, both are 4-bytes (32 bits) unsigned integers in
little-endian form. Hash table length may have zero length, meaning that corresponding hash table is empty.
Right after toc section, data section follows without any alingment. It consists of series of records, each is a key length, value (data)
length, key and value. Again, key and value length are 4-byte unsigned integers. Each next record follows previous without any special
alignment.
After data section, index (hash tables) section follows. It should be looked to in conjunction with toc section, where each of max 256
hash tables are defined. Index section consists of series of hash tables, with starting position and length defined in toc section. Every
hash table is a sequence of records each holds two numbers: key's hash value and record position inside data section (bytes from the begin-
ning of a file to first byte of key length starting data record). If record position is zero, then this is an empty hash table slot,
pointed to nowhere.
CDB hash function is
hv = ((hv << 5) + hv) ^ c
for every single c byte of a key, starting with hv = 5381.
Toc section indexed by (hv % 256), i.e. hash value modulo 256 (number of entries in toc section).
In order to find a record, one should: first, compute the hash value (hv) of a key. Second, look to hash table number hv modulo 256. If
it is empty, then there is no such key exists. If it is not empty, then third, loop by slots inside that hash table, starting from slot
with number hv divided by 256 modulo length of that table, or ((hv / 256) % htlen), searching for this hv in hash table. Stop search on
empty slot (if record position is zero) or when all slots was probed (note cyclic search, jumping from end to beginning of a table). When
hash value in question is found in hash table, look to key of corresponding record, comparing it with key in question. If them of the same
length and equals to each other, then record is found, overwise, repeat with next hash table slot. Note that there may be several records
with the same key.
SEE ALSO cdb(1), cdb(3).
AUTHOR
The tinycdb package written by Michael Tokarev <mjt@corpit.ru>, based on ideas and shares file format with original cdb library by Dan
Bernstein.
LICENSE
Public domain.
Apr, 2005 cdb(5)