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

etcdctl: add raw output format to get #6234

Closed
philips opened this issue Aug 21, 2016 · 2 comments
Closed

etcdctl: add raw output format to get #6234

philips opened this issue Aug 21, 2016 · 2 comments

Comments

@philips
Copy link
Contributor

philips commented Aug 21, 2016

version: git master

Ideally I can do a workflow like:

$ sha1sum ~/Documents/rmrf.gif
b4a28b73e93f8ee67ceeb028d4527a7fed7c8765  /Users/philips/Documents/rmrf.gif
$ REV=$(etcdctl put foo -w json < ~/Documents/rmrf.gif | jq .header.revision)
$ etcdctl get foo -w raw --rev=$REV > ~/Documents/rmrf.gif
$ sha1sum ~/Documents/rmrf.gif
77d489752d87f9d2f3bd16c172c79b0de31315f4  /Users/philips/Documents/rmrf.gif

Today the closest we have is "simple" but that prints out the key name:

$ sha1sum ~/Documents/rmrf.gif
b4a28b73e93f8ee67ceeb028d4527a7fed7c8765  /Users/philips/Documents/rmrf.gif
$ REV=$(etcdctl put foo -w json < ~/Documents/rmrf.gif | jq .header.revision)
$ etcdctl get foo --rev=$REV | tail -n +2 > ~/Documents/rmrf.gif
$ sha1sum ~/Documents/rmrf.gif
b4a28b73e93f8ee67ceeb028d4527a7fed7c8765  /Users/philips/Documents/rmrf.gif

Raw would be just like simple only w/o printing the keyname.

@xiang90 xiang90 added this to the v3.2.0-maybe milestone Aug 24, 2016
@gyuho
Copy link
Contributor

gyuho commented Aug 24, 2016

Maybe add a flag of --write-out="simple-value" then?

@philips
Copy link
Contributor Author

philips commented Aug 26, 2016

@gyuho yea, I don't know what to call it, that works

gyuho added a commit to gyuho/etcd that referenced this issue Aug 26, 2016
gyuho added a commit to gyuho/etcd that referenced this issue Aug 26, 2016
gyuho added a commit to gyuho/etcd that referenced this issue Aug 26, 2016
@gyuho gyuho removed this from the v3.3.0-maybe milestone Nov 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants