Guest User

Untitled

a guest
Feb 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. awk -F '[t]' -v OFS='t' '{i=$1;$1=x} NR==FNR{A[i]=$0;next} A[i]{print i,$0A[i]}' file2 file1 > file3
  2.  
  3. $ awk 'FNR==NR{a[$1]=$2;next};{$1 = $1"t"a[$1]}1' OFS='t' file1 file2
  4. 1 today a lot
  5. 1 today sometimes
  6. 2 tomorrow at work
  7. 2 tomorrow at home
  8. 2 tomorrow sometimes
  9. 3 red new
Add Comment
Please, Sign In to add comment