Search Results

Search: Posts Made By: Santoshbn
19,699
Posted By Corona688
The A[$1] before the code block: ...
The A[$1] before the code block: A[$1]{$5=A[$1];print}

nulls and blanks are considered false and won't run the code, anything else is true and will run the code block.
19,699
Posted By otheus
I think my answer is correct but you have the...
I think my answer is correct but you have the files on the command line in the wrong order.

awk 'NR==FNR{A[$1]=$2;next} A[$1]{$5=A[$1];print}' file1 file2
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 01:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy