Help to retrieve data from two files matching a string
Hello Experts,
I have come back to this forum after a while now, since require a better way to get my result.. My query is as below..
I have 3 files -- 1 Input file, 2 Data files .. Based on the input file, data has to be retreived matching from two files which has one common key..
For EX:
Input file
Data File1
Data file2
Output should be like
First column is the string from input file(919868191075) , next is the 2nd field in CSV file1 matching string in 6th field(000A02484A6B920158065E00 ), last one is 2nd field in csv file2 here matching string would be output retreived from first file(404686600667311
)...
Thanks in advance.. Looking forward for your help...
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)
Dear all,
I have the following problem (it originates in the domain of bio-inf, but it is a general problem).
I have two files of one column each and of different length: a.txt and b.txt.
a.txt contains alphanumeric strings (around 30 digit) and there are 300 rows
b.txt contains alphanumeric... (2 Replies)
Hi friends,,
i have find the matching data between 2files.
My file1 have a data like
rs3001336
rs3984736
rs2840532
File2 have a data like
rs3736330 1 2359237 A G 0.28 1.099 0.010
rs2840532 1 2359977 G A 0.363 0.3373 1.123
rs3001336 1 2365193 G A 0.0812 0.07319 1.12 ... (1 Reply)
Hi friends,,
i have find the matching data between 2files.
My file1 have a data like
rs3001336
rs3984736
rs2840532
File2 have a data like
rs3736330 1 2359237 A G 0.28 1.099 0.010
rs2840532 1 2359977 G A 0.363 0.3373 1.123
rs3001336 1 ... (4 Replies)
Hi Guys,
I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same.
can anyone of you please let me know how to go about it ? (8 Replies)
Hi,
How to check if a string on file2 exactly matches with a part or complete string on file1, and return a match indicator based on some match rules.
1) only records on file1 with category A should be matched. for other category, the output match indicator should default to 'N'
2) on file2... (13 Replies)
Hi,
Can anyone help me to compare two files and get the matching data... say i have file1 and file2 ... file1 has 300 unique data with that i need to match with file2 to see how may are matching.. file2 have 1000 records. (4 Replies)
Hi guys, I need your help.
I have two files:
file1
1
3
5
file2
1,XX
2,AA
3,BB
4,CC
5,DD
I would like to compare the first column and where they are equal to write that output in a new file:
1,XX
3,BB (7 Replies)
Hello,
I am looking to output all of the lines from file2 whose 11th field is present in the first field in file1. Then the second field from file1 should be appended as such:
file1:
2222 0.35
4444 0.25
5555 0.75
file2:
col1 col2 col3 col4 col5 col6 col7 col8 col9 col10 1111
col1 col2... (4 Replies)
Discussion started by: palex
4 Replies
LEARN ABOUT LINUX
mod_esi
mod_esi(3erl) Erlang Module Definition mod_esi(3erl)NAME
mod_esi - Erlang Server Interface
DESCRIPTION
This module defines the API - Erlang Server Interface (ESI). Which is a more efficient way of writing erlang scripts for your Inets web
server than writing them as common CGI scripts.
EXPORTS
deliver(SessionID, Data) -> ok | {error, Reason}
Types SessionID = term()
Data = string() | io_list()
Reason = term()
This function is only intended to be used from functions called by the Erl Scheme interface to deliver parts of the content to the
user.
Sends data from a Erl Scheme script back to the client.
Note:
Note that if any HTTP-header fields should be added by the script they must be in the first call to deliver/2 and the data in the call must
be a string. Do not assume anything about the data type of SessionID, the SessionID must be the value given as input to the esi call back
function that you implemented.
ESI CALLBACK FUNCTIONS EXPORTS
Module:Function(SessionID, Env, Input)-> _
Types SessionID = term()
Env = [EnvironmentDirectives] ++ ParsedHeader
EnvironmentDirectives = {Key,Value}
Key = query_string | content_length | server_software | gateway_interface | server_protocol | server_port | request_method |
remote_addr | script_name
Input = string()
The Module must be found in the code path and export Function with an arity of two. An erlScriptAlias must also be set up in the
configuration file for the Web server.
If the HTTP request is a post request and a body is sent then content_length will be the length of the posted data. If get is used
query_string will be the data after ? in the url.
ParsedHeader is the HTTP request as a key value tuple list. The keys in parsed header will be the in lower case.
SessionID is a identifier the server use when deliver/2 is called, do not assume any-thing about the datatype.
Use this callback function to dynamically generate dynamic web content. when a part of the page is generated send the data back to
the client through deliver/2 . Note that the first chunk of data sent to the client must at least contain all HTTP header fields
that the response will generate. If the first chunk not contains End of HTTP header that is "
" the server will assume that
no HTTP header fields will be generated.
Module:Function(Env, Input)-> Response
Types Env = [EnvironmentDirectives] ++ ParsedHeader
EnvironmentDirectives = {Key,Value}
Key = query_string | content_length | server_software | gateway_interface | server_protocol | server_port | request_method |
remote_addr | script_name. <v>Input = string()
Response = string()
This callback format consumes quite much memory since the whole response must be generated before it is sent to the user. This func-
tions is deprecated and only keept for backwards compatibility. For new development Module:Function/3 should be used.
Ericsson AB inets 5.5.2 mod_esi(3erl)