Hi All,
I have a file of the following format.
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user... (5 Replies)
Here's my work of testing whether a number input is perfect or not..
echo Enter a number
read no
i=1
ans=0
while
do
if
then
ans='expr $ans + $i'
fi
i='expr $i + 1'
done
if
then
echo $no is perfect
else
echo $no is NOT perfect
fi (12 Replies)
I've got an aix-box somewhere on the network and a PC on my desk. Nothing fancy so far.
The PC is made dual-boot:
- windowsXP with putty & winSCP
or
- slackware 13 with xfce4 installed.
The aix-box runs DB2 v8.2 and I've installed db2top to monitor the database.
db2top is a character... (0 Replies)
Hi All,
I have a text file which looks like this:
computer programming
systems engineering
I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this:
computer programming
systems engineering
I am using... (3 Replies)
I want to print only the lines that meet the criteria : "worde:" and "wordo;"
I got this far:
sed -n '/\(*\)\1e:\1o;/p;'
But it doesn't quite work.
Can someone please perfect it and tell me exactly how its a fixed version/what was wrong with mine?
Thanks heaps, (1 Reply)
I have to find last delimiter in each line of a file and store the value after the last '/' in a variable in ksh script...Pls Pls help me:(The file is as shown below:
/opt/apps/cobqa/apps/abadv/bind/advc0007.bnd
/opt/apps/cobqa/apps/abbrio/bind/naac6115.bnd... (5 Replies)
Discussion started by: bhavanabahety
5 Replies
LEARN ABOUT NETBSD
nbperf
NBPERF(1) BSD General Commands Manual NBPERF(1)NAME
nbperf -- compute a perfect hash function
SYNOPSIS
nbperf [-ps] [-a algorithm] [-c utilisation] [-h hash] [-i iterations] [-m map-file] [-n name] [-o output] [input]
DESCRIPTION
nbperf reads a number of keys one per line from standard input or input. It computes a minimal perfect hash function and writes it to stdout
or output. The default algorithm is "chm".
The -m argument instructs nbperf to write the resulting key mapping to map-file. Each line gives the result of the hash function for the
corresponding input key.
The parameter utilisation determines the space efficiency.
Supported arguments for -a:
chm This results in an order preserving minimal perfect hash function. The utilisation must be at least 2, the default. The number of
iterations needed grows if the utilisation is very near to 2.
chm3
Similar to chm. The resulting hash function needs three instead of two table lookups when compared to chm. The utilisation must be at
least 1.24, the default. This makes the output for chm3 noticable smaller than the output for chm.
bpz This results in a non-order preserving minimal perfect hash function. Output size is approximately 2.79 bit per key for the default
value of utilisation, 1.24. This is also the smallest supported value.
Supported arguments for -h:
mi_vector_hash Platform-independent version of Jenkins parallel hash. See mi_vector_hash(3).
The number of iterations can be limited with -i. nbperf outputs a function matching uint32_t hash(const void * restrict, size_t) to stdout.
The function expects the key length as second argument, for strings not including the terminating NUL. It is the responsibility of the call-
er to pass in only valid keys or compare the resulting index to the key. The function name can be changed using -n name. If the -s flag is
specified, it will be static.
After each failing iteration, a dot is written to stderr.
nbperf checks for duplicate keys on the first iteration that passed basic hash distribution tests. In that case, an error message is printed
and the program terminates.
If the -p flag is specified, the hash function is seeded in a stable way. This may take longer than the normal random seed, but ensures that
the output is the same for repeated invocations as long as the input is constant.
EXIT STATUS
The nbperf utility exits 0 on success, and >0 if an error occurs.
SEE ALSO mi_vector_hash(3)AUTHORS
Jorg Sonnenberger
BSD September 25, 2012 BSD