2
rated 0 times
[
2]
[
0]
/ answers: 1 / hits: 442
/ 1 Year ago, sat, april 15, 2023, 9:48:52
I have two files and I'm trying to join them at a certain spot. I'd like to join them at the fourth column of the second file using the first column of the first. It's driving me nuts!
Here is what I'm trying:
join -j4 <(sort -k1 FirstFile.txt) <(sort -k4 SecondFile.txt)
FirstFile.txt:
24.136.152.171 US
24.136.152.171 US
24.136.152.171 US
SecondFile.txt
2014-08-03 00:00:00 User 24.136.152.171
2014-08-03 00:00:00 User 24.136.152.171
2014-08-03 00:00:00 User 24.136.152.171
Desired Output:
2014-08-03 00:00:00 User 24.136.152.171 US
2014-08-03 00:00:00 User 24.136.152.171 US
2014-08-03 00:00:00 User 24.136.152.171 US
More From » 12.04