Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- $ awk 'FNR==NR{a[$1]=$2;next};{$1 = $1"t"a[$1]}1' OFS='t' file1 file2
- 1 today a lot
- 1 today sometimes
- 2 tomorrow at work
- 2 tomorrow at home
- 2 tomorrow sometimes
- 3 red new
Add Comment
Please, Sign In to add comment