Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. O,tested test,12345
  2. OC,test explore,34567
  3.  
  4. O,new order
  5. OC,new quote
  6.  
  7. New order,tested test,12345
  8. New quote,test explore,34567
  9.  
  10. join -t, -j1 -o 2.2,1.2,1.3 <(sort file1) <(sort file2)
  11.  
  12. $ awk -F, -v OFS="," 'FNR==NR {a[$1]=$2; next} {$1=a[$1]}1' f2 f1
  13. new order,tested test,12345
  14. new quote,test explore,34567
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement