SHARE
TWEET

Untitled

a guest Jun 24th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1001 1 2
  2. 1002 1 2
  3. 1003 3 5
  4. 1004 6 7
  5. 1005 8 9
  6.      
  7. 1002 7
  8. 1003 8
  9.      
  10. 1001 5
  11. 1002 3
  12.      
  13. 1002 10
  14. 1004 60
  15.      
  16. 1001 102
  17. 1003 305
  18. 1005 809
  19.      
  20. 1001 1 2 0 5  0 102
  21. 1002 1 2 7 3 10   0
  22. 1003 3 5 8 0  0 305
  23. 1004 6 7 0 0 60   0
  24. 1005 8 9 0 0  0 809
  25.      
  26. awk 'FNR==NR{a[$1]=$2;next}{print $0,a[$1]?a[$1]:"0"}' file2 file1
  27.  
  28. 1001 1 2 0
  29. 1002 1 2 7
  30. 1003 3 5 8
  31. 1004 6 7 0
  32. 1005 8 9 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top