0

How can I extract the base64 value shown below? I was trying to use something like awk {'print $14'}, but this doesn't work because the entire output is first item. If I decode the base64 value first, then I'm able to use awk {'print $14'} to eventually obtain the value that I need.

$ curl -s --request GET http://10.0.10.10:8500/v1/kv/w-key-value

[{"LockIndex":0,"Key":"w-key-value","Flags":0,"Value":"WyAgeyAgICBDcmVhdGVJbmRleDogMTAwLCAgICBNb2RpZnlJbmRleDogMjAwLCAgICBMb2NrSW5kZXg6IDIwMCwgICAgS2V5OiB6aXAsICAgIEZsYWdzOiAwLCAgICBWYWx1ZTogMSAgICBTZXNzaW9uOiBhZGY0MjM4YS04ODJiLTlkZGMtNGE5ZC01YjY3NThlNDE1OWUgIH1d","CreateIndex":4080,"ModifyIndex":4080}]
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
ikask
  • 318
  • 2
  • 11
  • 23

0 Answers0