Mapping the values of ids of two columns of file1 from file2
I have of two space separated files:
==> File1 <==
==> File 2 <==
I want to map the values for first and fourth column of File1 (begin with PT|np_xxxx) from column 2 of File2. The File2 contains the values of PT|np_xxxx.
The desired output is (mapped values of column1 from file2, column1 file1, column2 file1, column3 file1, column4 file1, mapped values of column4 from file2)
Hi All,
as you can see I'm pretty new to this board. :D
I'm struggling around with small script to search a few fields in another file.
Basically I have file1 looking like this:
15:38:28 sz:10001 pr:14.16
15:38:28 sz:10002 pr:18.41
15:38:29 sz:10003 pr:19.28
15:38:30 sz:10004... (1 Reply)
Hi people,
I have 2 files, one with a list of non consecutive ranges (File1.txt), where each range begins with the value in column 1
and finishes with the value in column 2 in the same line, as can be seen above.
215312581156279 215312581166279
215312582342558 215312582357758... (4 Replies)
Hi all,
I would like to replace some columns from file1 with columns from file2. Currently, I'm able to do it with the following command:
awk 'NR==FNR{a=$1;b=$2;c=$3;next;}
{$2=a;$4=b;$5=c;print}' file2 file1 > temp
mv -f temp file1
First, i make the changes and save it as a temp... (1 Reply)
I have read another post about this issue and am wondering how to adapt it
to my own, much simpler, issue.
I have a file of user IDs like so:
333333
321321
546465
...etc
I need to take each number and use it to print records wherein the 5th
field matches the user ID pulled from the... (2 Replies)
Hi everyone,
I have file1 and file2 comma separated both.
file1 is:
Header1,Header2,Header3,Header4,Header5,Header6,Header7,Header8,Header9,Header10
Code7,,,,,,,,,
Code5,,,,,,,,,
Code3,,,,,,,,,
Code9,,,,,,,,,
Code2,,,,,,,,,file2... (17 Replies)
Hello,
I have two data files:
file1
12345 aa bbb cccc
98765 qq www uuuu
76543 pp rrr bbbbb
34567 nn ccc sssss
87654 qq ppp rrrrr
file2
98765
34567
I need to remove the lines from file1 if the first field contains a value that appears in file2:
output
12345 aa bbb cccc
76543 pp... (2 Replies)
I have very limited coding skills but I'm wondering if someone could help me with this. There are many threads about matching strings in two files, but I have no idea how to add a column from one file to another based on a matching string.
I'm looking to match column1 in file1 to the number... (3 Replies)
I want to print only the lines in file2 that match file1, in the same order as they appear in file 1
file1
file2
desired output:
I'm getting the lines to match
awk 'FNR==NR {a++}; FNR!=NR && a' file1 file2
but they are in sorted order, which is not what I want:
Can anyone... (4 Replies)
I am trying to use awk to find all the $2 values in file2 which is ~30MB and tab-delimited, that are between $2 and $3 in file1 which is ~2GB and tab-delimited.
I have just found out that I need to use $1 and $2 and $3 from file1 and $1 and $2of file2 must match $1 of file1 and be in the range... (6 Replies)
Discussion started by: cmccabe
6 Replies
LEARN ABOUT DEBIAN
h5diff
h5diff(1) General Commands Manual h5diff(1)NAME
h5diff - Compares two HDF5 files and reports the differences.
SYNOPSIS
h5diff file1 file2 [OPTIONS] [object1 [object2 ] ]
DESCRIPTION
h5diff is a command line tool that compares two HDF5 files, file1 and file2, and reports the differences between them.
Optionally, h5diff will compare two objects within these files. If only one object, object1, is specified, h5diff will compare object1 in
file1 with object1 in file2. In two objects, object1 and object2, are specified, h5diff will compare object1 in file1 with object2 in
file2. These objects must be HDF5 datasets.
object1 and object2 must be expressed as absolute paths from the respective file's root group.
Additional information, with several sample cases, can be found in the document H5diff Examples.
OPTIONS
file1 file2
The HDF5 files to be compared.
-h Print all differences.
-r Print only the names of objects that differ; do not print the differences. These objects may be HDF5 datasets, groups, or named
datatypes.
-n count
Print difference up to count differences, then stop. count must be a positive integer.
-d delta
Print only differences that are greater than the limit delta. delta must be a positive number. The comparison criterion is whether
the absolute value of the difference of two corresponding values is greater than delta (e.g., |a-b| > delta, where a is a value in
file1 and b is a value in file2).
-p relative
Print only differences that are greater than a relative error. relative must be a positive number. The comparison criterion is
whether the absolute value of the difference 1 and the ratio of two corresponding values is greater than relative (e.g., |1-(b/a)| >
relative where a is a value in file1 and b is a value in file2).
object1 object2
Specific object(s) within the files to be compared.
EXAMPLES
The following h5diff call compares the object /a/b in file1 with the object /a/c in file2:
h5diff file1 file2 /a/b /a/c
This h5diff call compares the object /a/b in file1 with the same object in file2:
h5diff file1 file2 /a/b
And this h5diff call compares all objects in both files:
h5diff file1 file2
SEE ALSO h5dump(1), h5ls(1), h5repart(1), h5import(1), gif2h5(1), h52gif(1), h5perf(1)h5diff(1)