Hi,
I just wandering how to split a record which has more than one delimiter,
i have a file which contains pattern as group separtor and ~ as field separtor, Ultimately I need consider even the groups as a field, So i need to make this multi-delimited file into ~ delimited file.
My record... (4 Replies)
hi, pls someone tell me how to extract delimiters from any file and pass it to a unix script.since, im a beginner in unix i find it little bit difficult.how to use awk to do this? (9 Replies)
Hi
I have a file in which delimiter is ';'
However if the delimiter is within "" it is a part of the string and not delimiter.
How to get the fields ? I want to replace the delimiter ';' to '|'.
The file contains data like this :
11111; “2222 2222”; “3333; 3333”; “4444 ""44444”
The file... (2 Replies)
Hello,
I am trying to find the record count in a specific folder,
Here is the part of the code
===========================
STARTDATE=`date +"%y%m%d%H%M"`
for i in `ls *.DAT`
do
wc -l $i >> /XYZ/SrcFiles/"Record_counts"$STARTDATE.csv
... (2 Replies)
Hi All,
I woul like to know with out opening a file in unix ,how we can find out what is the delemeter in that file...
Thanks..
edit by bakunin: changed thread title to "delimiter" so it can be found. (4 Replies)
Hi there,
I am with this one column input text file to change layout, please help. Thanks. I have awk, sed.
$ cat input
Median
1.0
2.3
3.0
Median
35.0
26.3
45.7
10.1
63.1
Median
1.2
2.3 (8 Replies)
Hi,
I have a No Delimiter variable length text file with following schema -
Column Name Data length
Firstname 5
Lastname 5
age 3
phoneno1 10
phoneno2 10
phoneno3 10
sample data - ... (16 Replies)
Hi,
I have a input
/dev/cm/test1.txt
/qa/tm/hmkr/cc/test2.txt
and I need an out like below
foldername, filename
/dev/cm/,test1.txt
/qa/tm/hmkr/cc/,test2.txt
I tried with awk $NF, but I'm getting the filenames and not folder names. Please let me know how to achive the above... (5 Replies)
Hi,
Extremely new to Perl scripting, but need a quick fix without using TEXT::CSV
I need to read in a file, pass any delimiter as an argument, and convert it to bar delimited on the output. In addition, enclose fields within double quotes in case of any embedded delimiters.
Any help would... (2 Replies)
Discussion started by: JPB1977
2 Replies
LEARN ABOUT DEBIAN
hash32_strn
HASH(9) BSD Kernel Developer's Manual HASH(9)NAME
hash, hash32, hash32_buf, hash32_str, hash32_strn, hash32_stre, hash32_strne -- general kernel hashing functions
SYNOPSIS
#include <sys/hash.h>
uint32_t
hash32_buf(const void *buf, size_t len, uint32_t hash);
uint32_t
hash32_str(const void *buf, uint32_t hash);
uint32_t
hash32_strn(const void *buf, size_t len, uint32_t hash);
uint32_t
hash32_stre(const void *buf, int end, const char **ep, uint32_t hash);
uint32_t
hash32_strne(const void *buf, size_t len, int end, const char **ep, uint32_t hash);
DESCRIPTION
The hash32() functions are used to give a consistent and general interface to a decent hashing algorithm within the kernel. These functions
can be used to hash ASCII NUL terminated strings, as well as blocks of memory.
The hash32_buf() function is used as a general buffer hashing function. The argument buf is used to pass in the location, and len is the
length of the buffer. The argument hash is used to extend an existing hash, or is passed the initial value HASHINIT to start a new hash.
The hash32_str() function is used to hash a NUL terminated string passed in buf with initial hash value given in hash.
The hash32_strn() function is like the hash32_str() function, except it also takes a len argument, which is the maximal length of the
expected string.
The hash32_stre() and hash32_strne() functions are helper functions used by the kernel to hash pathname components. These functions have the
additional termination condition of terminating when they find a character given by end in the string to be hashed. If the argument ep is
not NULL, it is set to the point in the buffer at which the hash function terminated hashing.
RETURN VALUES
The hash32() functions return a 32 bit hash value of the buffer or string.
EXAMPLES
LIST_HEAD(head, cache) *hashtbl = NULL;
u_long mask = 0;
void
sample_init(void)
{
hashtbl = hashinit(numwanted, type, flags, &mask);
}
void
sample_use(char *str, int len)
{
uint32_t hash;
hash = hash32_str(str, HASHINIT);
hash = hash32_buf(&len, sizeof(len), hash);
hashtbl[hash & mask] = len;
}
SEE ALSO free(9), hashinit(9), malloc(9)LIMITATIONS
The hash32() functions are only 32 bit functions. They will prove to give poor 64 bit performance, especially for the top 32 bits. At the
current time, this is not seen as a great limitation, as these hash values are usually used to index into an array. Should these hash values
be used for other means, this limitation should be revisited.
HISTORY
The hash functions were first committed to NetBSD 1.6. The OpenBSD versions were written and massaged for OpenBSD 2.3 by Tobias Weingartner,
and finally committed for OpenBSD 3.2.
BSD April 3, 2007 BSD