09-18-2012
This User Gave Thanks to elixir_sinari For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to calculate the number of pipe delimiters in a file for all lines seperately.
For eg:i have a file Project.txt
Mohit|chawla|123|678
File1|File2|345|767|678
And my file contains many lines like this
it shd give me the output as
4
5
or give me the output for all the... (0 Replies)
Discussion started by: Mohit623
0 Replies
2. Shell Programming and Scripting
Hello guys
I want to retrieve two data from a file, like this:
bash-2.03$ cat numtest
123456
123457
bash-2.03$ more ./test_num
#!/bin/bash
num1=
num2=
cnt=1
while read x
do
num${cnt}=$x
cnt=$(($cnt+1))
done <$1
echo $num1 "\n" $num2
But when i executed this script, error... (2 Replies)
Discussion started by: tpltp
2 Replies
3. Shell Programming and Scripting
Hi Everyone,
I will try to explain my question please forgive my english here.
I am looking for shell script or command that can compare data in the files.
I have 50 files in one directory test1 test2 test3 ....so on.
I want to compare data in each files with each other and output each... (4 Replies)
Discussion started by: email-lalit
4 Replies
4. Programming
hi all,
In an mp3 file , data is arranged in sequence of header and data ,how to retrieve data between two headers. Is the data between two headers fixed? because as per theory it says 1152 samples will be there , but dont knw how many bits one sample correspond to?
it would help if any c... (2 Replies)
Discussion started by: shashi
2 Replies
5. UNIX for Advanced & Expert Users
How to write a shell script to retrieve datas from database after that this database are redirect to a excell sheet and then i got a mail that gives details about the database with the column name and data..
I m using oracle 9i...
Thanks,
Anup Das (2 Replies)
Discussion started by: anupdas
2 Replies
6. UNIX for Dummies Questions & Answers
Hi Guys,
How to retrieve/get *.sql file names which we refer in all *.sh files.
Can any one help me on this.
Thanks,
Kolipaka (3 Replies)
Discussion started by: lakshmanrk811
3 Replies
7. UNIX for Dummies Questions & Answers
Hi Guys,
Please help me with my problem here:
I have a source file:
1212 23232 343434 ASAS1 4
3212 23232 343434 ASAS2 4
3234 23232 343434 QWQW1 4
1134 23232 343434 QWQW2 4
3212 23232 343434 QWQW3 4
and a mapping... (4 Replies)
Discussion started by: kokoro
4 Replies
8. Shell Programming and Scripting
Hi,
I need to compare a file with its contents matching to that of another file(filename , received date and record count).
Lets say has File A original data
Ex -
1,abc,1234
2,bcd,4567
3,cde,8901
and File B has details of File A
Ex-
FILEA.TXT|06/17|2010|3
(filename)|(received... (18 Replies)
Discussion started by: Prashanth B
18 Replies
9. Shell Programming and Scripting
XYZNA0000778800Z
16123000012300321000000008000000000000000
16124000012300322000000007000000000000000
17234000012300323000000005000000000000000
17345000012300324000000004000000000000000
17456000012300325000000003000000000000000
9
XYZNA0000778900Z
16123000012300321000000008000000000000000... (8 Replies)
Discussion started by: later_troy
8 Replies
10. UNIX for Beginners Questions & Answers
I am having trouble matching *two* strings from one file anywhere in a line of a second file, and could use some help getting this figured out. My preference would be to use grep for this because I would like to take advantage of its -A option. The latter is due to the fact that I would like both... (2 Replies)
Discussion started by: jvoot
2 Replies
CDB(5) BSD File Formats Manual CDB(5)
NAME
cdb -- format of the constant database
DESCRIPTION
The cdb database format provides a space-efficient (key,value) database. The format doesn't allow updates in any convenient form. The file
overhead is around 5 bytes per key and 5 bytes per entry. Keys are not stored and it is the responsibility of the caller to validate
matches. The index structure is based on a minimal perfect hash table, so exactly one entry has to be checked for a match.
General Format
The header record of a cdb database consists of the following:
struct header_cdb {
uint8_t magic[7];
uint8_t version;
uint8_t description[16];
uint32_t data_size;
uint32_t entries;
uint32_t entries_index;
uint32_t seed;
};
All fields are in Little Endian byte order.
This is followed by a description of the hash function of entries_index records. The size of each index entry is the logarithm of entries to
base 256, rounded up.
The index records are followed by the start offsets of the entries, followed by data_size. The offsets are relative to the end of the offset
record table and are monotically increasing. The size of each offset record is the logarithm of data_size to base 256, rounded up.
The offset table is followed by the entries in order. No separation or padding is added.
Limitations
The cdb file format is by design intended for a database that can be mapped into memory. The hard limit for the number of entries and keys
is 3435973836. The total size of all values must be smaller than 4GiB.
SEE ALSO
cdbr(3), cdbw(3)
HISTORY
Support for the cdb format first appeared in NetBSD 6.0.
AUTHORS
The cdbr and cdbw functions have been written by Joerg Sonnenberger <joerg@NetBSD.org>.
BSD
April 27, 2010 BSD