Elektra
0.9.0
|
This plugin uses Bison to generate a parser for the YAML serialization format.
The plugin requires Bison (version 3.0 or later).
```
sudo kdb mount config.yaml user/tests/yambi yambi
printf 'boolean: false' > kdb file user/tests/yambi
0
and 1
kdb get user/tests/yambi/boolean #> 0
kdb rm -r user/tests/yambi sudo kdb umount user/tests/yambi
sudo kdb mount config.yaml user/tests/yambi yambi
printf – 'Thumper: - Eating greens is a special treat.
' > kdb file user/tests/yambi
printf – ' - It makes long ears and great big feet.
' >> kdb file user/tests/yambi
printf – '- But it sure is awful stuff to eat.
' >> kdb file user/tests/yambi
printf – ' - I made that last part up myself
.' >> kdb file user/tests/yambi
printf – 'Stephen King:
' >> kdb file user/tests/yambi
printf – ' The first movie I ever saw was a horror movie.
' >> kdb file user/tests/yambi
printf – ' - It was Bambi.
' >> kdb file user/tests/yambi
kdb get user/tests/yambi/Thumper/#2
config.yaml
depends on the current user and OS,config.yaml
as user/tests/error/prefix
.kdb set user/tests/error "$(2>&1 kdb ls user/tests/yambi)" kdb set user/tests/error/prefix "$(kdb get user/tests/error | grep 'config.yaml' | head -1 | sed -E 's/(.*)config.yaml.*/\1/')" kdb get user/tests/error/prefix
kdb set user/tests/error/prefix/length "$(kdb get user/tests/error/prefix | wc -c | sed 's/[ ]*//g')"
head
and tail
.kdb get user/tests/error | tail -n6 | cut -c"$(kdb get user/tests/error/prefix/length | tr -d '\n')"- #> config.yaml:3:1: syntax error, unexpected element, expecting end of map or key #> - But it sure is awful stuff to eat. #> ^ #> config.yaml:7:2: syntax error, unexpected start of sequence, expecting end of map or key #> - It was Bambi. #> ^
printf – 'Thumper: - Eating greens is a special treat.
' > kdb file user/tests/yambi
printf – ' - It makes long ears and great big feet.
' >> kdb file user/tests/yambi
printf – ' - But it sure is awful stuff to eat.
' >> kdb file user/tests/yambi
printf – ' - I made that last part up myself
.' >> kdb file user/tests/yambi
printf – 'Stephen King:
' >> kdb file user/tests/yambi
printf – ' - The first movie I ever saw was a horror movie.
' >> kdb file user/tests/yambi
printf – ' - It was Bambi.
' >> kdb file user/tests/yambi
kdb get user/tests/yambi/Thumper/#2 #> But it sure is awful stuff to eat.
kdb rm -r user/tests/error kdb rm -r user/tests/yambi sudo kdb umount user/tests/yambi ```
The plugin supports the same limited YAML syntax as Yan LR.