Skip to content

Find updated rows between two files (csv) #1097

Answered by johnkerl
benedictdudel asked this question in Q&A
Discussion options

You must be logged in to vote

@benedictdudel very interesting question!!! :D

One thought:

$ mlr --csv join --lp left_ --rp right_ -j id -f a.csv \
  then filter '$left_color != $right_color' \
  b.csv
id,left_color,right_color
6,yellow,black

Or (longer)

$ mlr --csv join --lp left_ --rp right_ -j id -f a.csv \
  then filter '$left_color != $right_color' \
  then cut -xf left_color \
  then rename right_color,color \
  b.csv
id,color
6,black

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@johnkerl
Comment options

@benedictdudel
Comment options

@johnkerl
Comment options

@janxkoci
Comment options

Answer selected by benedictdudel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants