04-12-2019
thanks alot, i thought about comparing every word with its number using case or if but then i was stuck in making that one two three a full integer 123, but with the array it works now, thanks alot wisecracker and rudic.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I am very new to NAWK programming so this question is probably going to sound really stupid:
I have a NAWK script which contains a DO loop. During each loop it runs a FORTRAN program which in turn generates two output files , each one containing 2 integer variables. I would appreciate it... (8 Replies)
Discussion started by: robbiegregg
8 Replies
2. Shell Programming and Scripting
Hi,
I am trying to automate one of the application using IE:Auotmation in perl
My web application has few text fields and 2 buttons "Save Changes" and "Discard Changes".I have written code to enter values to the text fields fetching from input file and click the button "Save Changes".As soon as... (0 Replies)
Discussion started by: jyo123.jyothi
0 Replies
3. Shell Programming and Scripting
File having data in following format :
file name : file.txt
--------------------
111111;name1
222222;name2
333333;name3
I want to read this file so that I can split these into two paramaters i.e. 111111 & name1 into two different variables(say value1 & value2).
i.e val1=11111 &... (2 Replies)
Discussion started by: sjoshi98
2 Replies
4. Shell Programming and Scripting
Hi All,
I have a file, let's call it "info.tmp" that contains data like this ..
ABC123456
PCX333445
BCD789833
I need to read "info.tmp" and for each line add strings in a way that the final output is
put /logs/ua/dummy.trigger 'AAA00001.FTP.XXX.BLA03A01.xxxxxx(+1)'
where XXX... (5 Replies)
Discussion started by: Andy_ARG
5 Replies
5. Shell Programming and Scripting
how can i get this script to read users input from file and save the users input if it is not in the file?
#!/bin/sh
echo -n "filename:"
read filename
for i in 1 2 3 4 5
do
echo -n "Enter filename:"
read lineoftext
echo "$lineoftext" >> $filename
done (1 Reply)
Discussion started by: noob
1 Replies
6. Shell Programming and Scripting
i have a text file consists of different file names like:
line 1: lib/libIMb.so message broker file
line 2: lil/imbdfg.lil message broker file
i need to extract libIMb.so and imbdfg.lil files from those lines and save them in a variable. so that i can search for... (9 Replies)
Discussion started by: santosh2626
9 Replies
7. UNIX for Advanced & Expert Users
My requirement is to read a column data from a file & save it in a variable for each row & process it. I am using the below code-
Leadlines="$TGTFILE/Error.txt">>$log_file
while read line
do
id = ` echo $line | cut -d "," -f1 `
email = ` echo $line | cut -d "," -f2 `
-----------
done
My... (2 Replies)
Discussion started by: saga20
2 Replies
8. Shell Programming and Scripting
Hi All,
Hope you guys had a wonderful weekend
I have a scenario where in which I have to read a file line by line
and check for few words before redirecting to a file
I have searched the forum but,either those answers dint work (perhaps because of my wrong under standing of how IFS... (6 Replies)
Discussion started by: Kingcobra
6 Replies
9. UNIX for Dummies Questions & Answers
Hi all, I have a file that contains characters. How do I get total of spesific character from that file and save the count to a variable for doing for calculation.
data.txt
1
2
2
2
2
3
3
4
5
6
7
8
5
4
3
4 (5 Replies)
Discussion started by: weslyarfan
5 Replies
10. Shell Programming and Scripting
Hi All,
I am looking for a perl/awk/sed command to auto-increment the numbers line in file, P1.tcl:
run_build_model sparc_ifu_dec
run_drc
set_faults -model path_delay -atpg_effectiveness -fault_coverage
add_delay_paths P1
set_atpg -abort_limit 1000
run_atpg -ndetects 1000
I would like... (6 Replies)
Discussion started by: jypark22
6 Replies
Judy(3X) Judy(3X)
NAME
Judy functions - C libraries for creating and accessing dynamic arrays
SYNOPSIS
Judy1 - maps an Index (word) to a bit
JudyL - maps an Index (word) to a word
JudySL - maps an Index (string) to a word
DESCRIPTION
The Judy family of functions supports fully dynamic arrays. These arrays may be indexed by a 32- or 64-bit word (depending on the proces-
sor) or a string. A dynamic array that is sparsely populated can be thought of as a mapping function. There are 3 different Judy mappings
currently supported:
Judy1 maps an Index (word) to a bit.
JudyL maps an Index (word) to a word.
JudySL maps an Index (string) to a word.
For Judy1 functions and JudyL functions, Index should be declared as a Word_t type. Word_t is defined in the Judy.h header file as a 32-
or 64-bit unsigned native integer, and has the same number of bits as a pointer.
For JudySL functions, each index is a null-terminated string.
Judy arrays are both speed- and memory-efficient, with no tuning or configuration required, across a wide range of index set types (sequen-
tial, periodic, clustered, random). Judy's speed and memory usage are typically better than other data storage models such as skiplists,
binary trees, b-trees, or even hashing, and improves with very large data sets.
A Judy array is created merely by defining a null pointer and then storing (inserting) the first element into the array under that pointer.
The memory used by a Judy array is proportional to the population (number of elements).
Judy has two Application Program Interfaces (APIs): a C macro interface, and a function call interface. Because the macro forms are faster
and have a simpler error handling interface than the equivalent functions, they are the preferred way of calling the Judy functions.
Since an initial (empty) Judy array is represented by a null pointer, it is possible to construct an array of Judy arrays. In other words,
a Judy array's values (except Judy1) can be pointers to other Judy arrays.
AUTHOR
Judy was invented and implemented by Hewlett-Packard. (Note: Judy is named for the inventor's sister.)
FILES
Locations of interest include:
Documents, including HTML versions of the manual entries.
Demonstration program source files.
SEE ALSO
Judy1(3X), JudyL(3X), JudySL(3X),
the Judy website, http://www.hp.com/go/judy/, for more information and Application Notes.
Judy(3X)