radareorg / sdb

Simple and fast string based key-value database with support for arrays and json
https://www.radare.org/
MIT License
217 stars 62 forks source link

Using syntax []k=1,2,3 with sdb(1) doesn't store result #36

Closed dbohdan closed 10 years ago

dbohdan commented 10 years ago

Commands sdb file '[]r=3,4,5,6' '[0]r' and sdb file 'r=3,4,5,6' '[0]r' produce the same output to the console (3) but with the former the value of r isn't stored in file and file doesn't get created if it didn't exist.

This is with version b28b355c73 on Fedora 20 and Ubuntu 12.04. Example transcript:

dbohdan@x61s $ ls -l d2; sdb d2 '[]r=3,4,5,6' '[0]r'; sdb d2; ls -l d2
ls: cannot access d2: No such file or directory
3
ls: cannot access d2: No such file or directory
dbohdan@x61s $ ls -l d2; sdb d2 'r=3,4,5,6' '[0]r'; sdb d2; ls -l d2
ls: cannot access d2: No such file or directory
3
r=3,4,5,6
-rw-r--r--. 1 dbohdan dbohdan 2078 May 12 09:50 d2