Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add space separated values and fields #26

Closed
wants to merge 5 commits into from

Conversation

saikey0379
Copy link

  • rdb -c json -fields key,size -o <output_path> <source_path>
  • rdb -c ssv -fields key,size -regex -o <output_path> <source_path>

The examples for ssv result:

#% rdb -c ssv -fields key,size -regex FULL -o ~/Downloads/rdb.ssv ~/Downloads/dump-0001.rdb 
#% head ~/Downloads/rdb.ssv
8 CHEMXXXL:FULL:axxxxx:1:1:1:1 132 
8 CHEMXXXL:FULL:bxxxxx:1:1:1:1 132 
8 CHEMXXXL:FULL:cxxxxx:1:1:1:1 132 
8 CHEMXXXL:FULL:dxxxxx:1:1:1:1 132 
8 CHEMXXXL:FULL:exxxxx:1:1:1:1 132 
8 CHEMXXXL:FULL:fxxxxx:1:1:1:1 132 
8 CHEMXXXL:FULL:gxxxxx:1:1:1:1 132 
8 CHEMXXXL:FULL:hxxxxx:1:1:1:1 132 
8 CHEMXXXL:FULL:ixxxxx:1:1:1:2 540 
8 CHEMXXXL:FULL:jxxxxx:1:1:1:1 132 
#% diff ~/Downloads/rdb.ssv ~/Downloads/rdb.ssv1 | grep "^>" | sort -nk5
> 0 string WORK:AREDIS:PID:cabcdef 335545
> 0 string WORK:AREDIS:PID:2abcdef 419431
> 0 string WORK:AREDIS:PID:3abcdef 419431
> 0 string WORK:AREDIS:PID:9abcdef 419431
> 0 string WORK:AREDIS:PID:cabcdef 419431
> 0 string WORK:AREDIS:PID:fabcdef 419431
#% diff ~/Downloads/rdb.ssv ~/Downloads/rdb.ssv1 | grep "^>" |awk '{sum+=$NF} END {print sum}'
2123412352

@HDT3213 HDT3213 closed this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants