08-04-2008
For that amount of data, maybe it would make sense to import the information into a database.
Search this site for
NR=FNR for a number of
awk solutions to similar problems.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have two files file1 and file2 delimited by semicolon,
And I want to compare column 2 and column3 of file1 to column3 and column 4 in file2.
file1
--------
abc;cef;155.67;143_34;
def;fgh;146.55;123.3;
frg;hff;134.67;;
yyy;fgh;134.78;35_45;
file 2
---------
abc;cef;155.09;;... (12 Replies)
Discussion started by: jerome Sukumar
12 Replies
2. UNIX for Dummies Questions & Answers
Hi, There are two files in UNIX system with some lines are exactly the same, some lines are not.
I want to compare these two files.The 2 files (both the files have data in Column format )should be compared row wise and any difference in data for a particular row should lead to storage of data of... (32 Replies)
Discussion started by: Dana Evans
32 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I would like to know if we can compare binary(non text) files in unix
eg. exes
Thanks
Saurabh (3 Replies)
Discussion started by: smehra_20
3 Replies
4. Shell Programming and Scripting
Hi,
I have a problem with comparison of two files
file1
20100101
20090101
20080101
20071001
20121229
file2
19990112 12 456 7
20011131 19
20100101 2 567 1 987
17890709 123 555
and, sh script needs to compare of these two files and give out to me result:
20100101 2 567 1 987
it... (5 Replies)
Discussion started by: shizik
5 Replies
5. Shell Programming and Scripting
Hello,
I have two files with tab delimited data. The file will contain details something like below:
FILENAME.A.B.C. 3 5 VALID PROCESSED
I would have a bench mark file. I would be getting new files of the same format. My requirement is to compare a particular field for a... (3 Replies)
Discussion started by: Praveenkulkarni
3 Replies
6. Shell Programming and Scripting
Need a write script in bournce shell.
Compare all the file contents and need to generate a report.
Example :
Having 10 trace.log files like below
trace1.log,
trace2.log
....
trace10.log
Need to compare all the 10 files contents and provide the report as below,
Assume trace... (1 Reply)
Discussion started by: sureshmani
1 Replies
7. Shell Programming and Scripting
Hi all
I have two files which I have to compare that whetehr there is soemthing common or not
body, div, table, thead, tbody, tfoot, tr, th, td, p { font-family: "Liberation Sans"; font-size: x-small; }
body, div, table, thead, tbody, tfoot,... (2 Replies)
Discussion started by: manigrover
2 Replies
8. Shell Programming and Scripting
Hello,
I am having output shown below names will change and can show different result and i want to compare with the checklist this file will not change it is standard settings.
If there is some discrepancy than the complete line of output should be shown with name.
I tried to use below... (10 Replies)
Discussion started by: rajjev_saini123
10 Replies
9. Shell Programming and Scripting
Hello to all in forum,
May you experts could help me with this complex comparison please.
I need to search the numbers in file1 within column3 of file2 and if found, compare column4 to NF
of file2 with the lines in file3. If the column4 to NF in file2 match any of the lines
in file3,... (5 Replies)
Discussion started by: Ophiuchus
5 Replies
10. Shell Programming and Scripting
I have the requirement
I have two files
cat fileA
something
anythg
nothing
everythg
cat fileB
everythg
anythg
Now i shld use fileB and compare every line at fileA and get the output as
something
nothing (3 Replies)
Discussion started by: Priya Amaresh
3 Replies
LEARN ABOUT PHP
http_build_url
HTTP_BUILD_URL(3) 1 HTTP_BUILD_URL(3)
http_build_url - Build a URL
SYNOPSIS
string http_build_url ([mixed $url], [mixed $parts], [int $flags = HTTP_URL_REPLACE], [array &$new_url])
DESCRIPTION
Build a URL.
The parts of the second URL will be merged into the first according to the flags argument.
PARAMETERS
o $url
- (part(s) of) a URL in form of a string or associative array like parse_url(3) returns
o $parts
- same as the first argument
o $flags
- a bitmask of binary or'ed HTTP_URL constants; HTTP_URL_REPLACE is the default
o $new_url
- if set, it will be filled with the parts of the composed url like parse_url(3) would return
RETURN VALUES
Returns the new URL as string on success or FALSE on failure.
EXAMPLES
Example #1
A http_build_url(3) example
<?php
echo http_build_url("http://user@www.example.com/pub/index.php?a=b#files",
array(
"scheme" => "ftp",
"host" => "ftp.example.com",
"path" => "files/current/",
"query" => "a=c"
),
HTTP_URL_STRIP_AUTH | HTTP_URL_JOIN_PATH | HTTP_URL_JOIN_QUERY | HTTP_URL_STRIP_FRAGMENT
);
?>
The above example will output:
ftp://ftp.example.com/pub/files/current/?a=c
SEE ALSO
parse_url(3), http_build_str(3).
PHP Documentation Group HTTP_BUILD_URL(3)