Could you please try following.
Output will be as follows. EDIT: After reading your question again, 1 question came. Is it you want to check $2 also from Input_file2 to Input_file1 comparison vice?
Thanks,
R. Singh
Last edited by RavinderSingh13; 11-17-2019 at 02:25 AM..
This User Gave Thanks to RavinderSingh13 For This Post:
Hello all,
Would appreciate if someone can help me out on the following requirement.
INPUT FILE:
--------------------------
TPS REPORT
abc def ghi
jkl mon pqr
stu vrs lll
END OF TPS REPORT
TPS REPORT
field1 field2 field3
field4 field5 field6 (8 Replies)
Hello!
I am writing a program to run through two large lists of data (~300,000 rows), find where rows in one file match another, and combine them based on matching fields. Due to the large file sizes, I'm guessing AWK will be the most efficient way to do this. Overall, the input and output I'm... (5 Replies)
Hi every one;
I have a 31500-line text file upon which two following tasks are to be performed:
1: Rearranging the file
2: Taking the average of each column (considering number of zeros) and output the result into a new file
This is the code I've come up with:
awk '(NR%3150<3150)... (0 Replies)
Hi,
I'm very new to these forums. I was wondering if someone could help an AWK beginner with a pattern matching
an actor to his appearance in movies, which would be stored as records. Let's say we have a database of 4 movies (each movie a record with name, studio + year, and actor fields with... (2 Replies)
Hi,
input:
AA|BB|CC
DD|EE
FF
what I am trying to get:
AA|BB|CC
DD|EE|
FF||
I tried to create first an UDF for printing repeats, but I think I have an issue with my END section or my array:
function repeat(str, n, rep, i)
{
for(i=1 ;i<n;i++)
rep=rep str
return rep
}
... (6 Replies)
Hi,
I have 2 tab-delimited input files as follows.
file1.tab:
green A apple
red B apple
file2.tab:
apple - A;Z
Objective:
Return $1 of file1 if,
. $1 of file2 matches $3 of file1 and,
. any single element (separated by ";") in $3 of file2 is present in $2 of file1
In order to... (3 Replies)
Trying to use awk to match the contents of each line in file1 with $5 in file2. Both files are tab-delimited and there may be a space or special character in the name being matched in file2, for example in file1 the name is BRCA1 but in file2 the name is BRCA 1 or in file1 name is BCR but in file2... (6 Replies)
I apologize in advance, but I continue to have trouble searching for matches between two files and then printing portions of each to output in awk and would very much appreciate some help.
I have data as follows:
File1
PS012,002 PRQ 0 1 1 17 1 0 -1 3 2 1 2 -1 ... (7 Replies)
In two previous posts (here) and (here), I received help from forum members comparing multiple fields across two files and selectively printing portions of each as output based upon would-be matches using awk. I had been fairly comfortable populating awk arrays with fields and using awk's special... (3 Replies)
Hi,
My input looks like that:
A|123|qwer
A|456|tyui
A|456|wsxe
B|789|dfgh
Using awk, I am trying to get:
A|123;456|qwer;tyui;wsxe
B|789|dfgh
For records with same $1, group all the $2 in a field (without replicates), and all the $3 in a field (without replicates).
What I have tried:... (6 Replies)
Discussion started by: beca123456
6 Replies
LEARN ABOUT PHP
px_get_info
PX_GET_INFO(3)PX_GET_INFO(3)px_get_info - Return lots of information about a paradox fileSYNOPSIS
array px_get_info (resource $pxdoc)
DESCRIPTION PARAMETERS
o $pxdoc
- Resource identifier of the paradox database as returned by px_new(3).
RETURN VALUES
Returns an associated array with lots of information about a paradox file. This array is likely to be extended in the future.
o fileversion
-Version of file multiplied by 10, e.g. 70.
o tablename
-Name of table as stored in the file. If the database was created by pxlib, then this will be the name of the file without the
extension.
o numrecords
-Number of records in this table.
o numfields
-Number of fields in this table.
o headersize
-Number of bytes used for the header. This is usually 0x800.
o recordsize
-Number of bytes used for each record. This is the sum of all field sizes (available since version 1.4.2).
o maxtablesize
- This value multiplied by 0x400 is the size of a data block in bytes. The maximum number of records in a datablock is the integer
part of (maxtablesize * 0x400 - 8) / recordsize.
o numdatablocks
- The number of data blocks in the file. Each data block contains a certain number of records which depends on the record size and
the data block size (maxtablesize). Data blocks may not necessarily be completely filled.
o numindexfields
- Number of fields used for the primary index. The fields do always start with field number 1.
o codepage
- The DOS codepage which was used for encoding fields with character data. If the target encoding is not set with px_set_targeten-
coding(3) this will be the encoding for character fields when records are being accessed with px_get_record(3) or
px_retrieve_record(3).
SEE ALSO px_numfields(3), px_numrecords(3).
PHP Documentation Group PX_GET_INFO(3)