我有两个文件。 file1数据为
en_4156 A 282.97 1.44 i 1.00
en_4156 A 284.41 0.27 know 0.99
en_4156 A 291.41 1.32 i 1.00
en_4156 A 292.73 0.00 know 1.00
en_4156 A 292.73 1.38 i 1.00
en_4156 A 294.14 1.62 know 1.00
en_4156 A 296.09 2.64 what 0.55
en_4156 A 299.22 2.58 oh 1.00
en_4156 A 301.80 1.83 yeah 1.00
en_4156 A 303.91 0.84 well 0.95
en_4156 A 304.75 0.06 i'm 1.00
en_4156 A 304.84 0.00 going 0.95
en_4156 A 304.84 0.00 to 0.95
en_4156 A 304.84 0.48 have 1.00
en_4156 A 305.35 0.18 mine 0.98
和file2数据为 -
en_4156 A en_4156_A 301.85 302.48 <O,en,F,en-F> OH YEAH
en_4156 A en_4156_A 304.71 306.72 <O,en,F,en-F> WELL I AM GOING TO HAVE MINE IN TWO MORE CLASSES
en_4156 A en_4156_A 307.63 311.16 <O,en,F,en-F> NO I AM NOT WELL THEN I HAVE TO TAKE MY EXAMS MY ORALS BUT
en_4156 A en_4156_A 313.34 315.37 <O,en,F,en-F> THAT IS KIND OF WHAT I WOULD LIKE TO DO
en_4156 A en_4156_A 316.83 319.20 <O,en,F,en-F> I MIGHT EVEN WANT TO GO ON AND GET MY P H D
en_4156 A en_4156_A 321.55 322.16 <O,en,F,en-F> IT IS JUST THAT
en_4156 A en_4156_A 323.05 327.38 <O,en,F,en-F> I DO NOT KNOW IT IS SO COMFORTABLE WHERE I AM AND AND IF I
en_4156 A en_4156_A 332.73 335.05 <O,en,F,en-F> LEAKY LISTEN I FLEW IN A FOUR SEATER PLANE
en_4156 A en_4156_A 335.79 338.72 <O,en,F,en-F> I WENT TO THE LAKE OF THE OZARKS (TW-) ON FOURTH OF JULY WEEKEND
en_4156 A en_4156_A 339.05 342.51 <O,en,F,en-F> I MET THIS GUY HE IS A TOTAL YAHOO BUT LET ME TELL YOU
en_4156 A en_4156_A 342.82 345.20 <O,en,F,en-F> I THERE WAS SOMETHING ABOUT HIM HE IS IN HIS FORTIES
我的查询是 - 我需要将File1的column3数据与File2的column4数据进行比较,并将file1数据保存到文件中。
任何人都可以使用awk为此编写脚本。