Hello everyone,
I have been struggling with the following situation, I think I am doing something wrong, can anyone help?
I have 2 comma separated files, the first is a look-up table that will supply the phone number based on the customer id, the second is a file containing customers and their id.
I would like to generate a file with customer name an phone number for each customer.
No matter what I try I do not seem to find proper matches. The code I have always runs into the 'not matched' section and generated the 'Error' string as printout for all of my incoming records.
When I will manage to see the matching occur then I will introduce the proper PRINT to gather all the data andl place that onto the output, for now I am just trying to see if I am actually able to match.
I also included the for loop at the end just to see I had populated the array properly .... everything to my eyes seems ok, yet I cannot get the matches to occur. Additionally can I also avoid the displaying of all the lines getting processed to go to the screen, I do not see which section of the code is doing that?
Hope someone can help.
Thanks in advance!
File uno contains:
File due contains:
This is the output I get in outtel:
Write a quick shell snippet to find all of the IPV4 IP addresses
in any and all of the files under /var/lib/output/*, ignoring
whatever else may be in those files. Perform a reverse lookup on
each, and format the output neatly, like "IP=192.168.0.1,
... (0 Replies)
Hi All,
I'm writing unix script, it should find exact matching in search string. Looks simple but when i started i'm stuck to find the exact match character string.
The unix script reads the records from DB Table. The table will have values something likes these
Feed : A Feed File name :... (3 Replies)
I hope I'm asking this the right way --
I've been sending out a lot of resumes and some of them I saw on Craigslist -- so I named the file as 'Craigslist -- (filename)'. Well I noticed that at least one of the files was misspelled as 'Craigslit.'
I want to eventually try to write a shell... (5 Replies)
Hi Guys,
Please help me out in my situation of writing a shell script
Exampl:I have a output like
asnapply 1 2 3 apply_server=1 apply_schema=ASN
asnapply 1 2 3 apply_server=2 apply_schema=ASN
Now i need output like
asnacmd applysever=1 applyschema=ASN stop
asnacmd applysever=2... (16 Replies)
I have a file that has information for a person....each person gets 3 or more lines to describe them.
I was hoping to match person 1, then person 2.....BUT I do not know how to tell grep I only want the first (2nd, 3rd or nth) match.
The alternative is doing line by line logic, which is fine... (8 Replies)
Hi,
I appreciate all who have been very helpful to me in providing valuable suggestions and replies.
I want to write a script to look up a file and match the contents. Let me go through the scenario. Lets say i have two files
Content file:
abc, bcd, adh|bcdf|adh|wed
bcf, cdf,... (2 Replies)
I have the below 2 files:
1) Third field from file1.txt should be compared to the first field of lookup.txt.
2) If match found then third field, file1.txt should be substituted with the second field from lookup.txt.
3)Else just print the line from file1.txt.
File1.txt:... (4 Replies)
Hi,
I'm new to scripting and unable to find out a way to perform the below task. Request help in finding out a way to accomplish this.
File one consists of some numbers/string which i need to lookup against file 2 and fetch the best match results in output. If best match is not present in... (3 Replies)
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
In the awk below I am trying to output those lines that Match between file1 and file2, those Missing in file1, and those missing in file2. Using each $1,$2,$4,$5 value as a key to match on, that is if those 4 fields are found in both files the match, but if those 4 fields are not found then missing... (0 Replies)
Discussion started by: cmccabe
0 Replies
LEARN ABOUT SUNOS
mlib_imagelookup_inp
mlib_ImageLookUp_Inp(3MLIB) mediaLib Library Functions mlib_ImageLookUp_Inp(3MLIB)NAME
mlib_ImageLookUp_Inp - table lookup, in place
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_ImageLookUp_Inp(mlib_image *srcdst, const void **table);
DESCRIPTION
The mlib_ImageLookUp_Inp() function maps the source image to the destination image, in place, by using the user-specified lookup table.
The following equation is used:
srcdst[x][y][i] = table[i][srcdst[x][y][i]]
PARAMETERS
The function takes the following arguments:
srcdst Pointer to first source and destination image.
table Pointer to lookup table. The data type of the lookup table is the same as the destination image. The number of entries in
the lookup table is determined by the type of the input image. The format of the lookup table is:
table[channel][index]
The MLIB_BYTE type entries are indexed from 0 to 255. The MLIB_SHORT type entries are indexed from -32768 to -1, then from
0 to 32767. The MLIB_USHORT type entries are indexed from 0 to 65535. The MLIB_INT type entries are indexed from
-2147483648 to -1, and then from 0 to 2147483647.
RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO mlib_ImageLookUp(3MLIB), mlib_ImageLookUp2(3MLIB), mlib_ImageLookUpMask(3MLIB), attributes(5)SunOS 5.10 10 Nov 2004 mlib_ImageLookUp_Inp(3MLIB)