Skip to content
Advertisement

Add a column from one file into another file using AWK for a given condition [closed]

First of all, thank you for your help. I have 2 files which are

JavaScript

And

JavaScript

I wanto to filter both files using AWK so the if $2 in the first file is equal to the value of $2 in the second file the output will be adding a new column which matches the condition given:

JavaScript

I have tried this code:

JavaScript

The problem is that the code only replace one column for the other I want to that the column matches the condition I have given above. Also I want to put the new column between the columns from number.txt file

Advertisement

Answer

The following might work for you:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement