Calebe94 / tinytools

Tiny scripts to improve your productivity.
GNU General Public License v3.0
6 stars 0 forks source link

tyaml displaying empty line #115

Closed Calebe94 closed 3 years ago

Calebe94 commented 3 years ago

Given the following file:

parentKey:
  child1: some value
  child2: foo
  child3: bar
    childAgain: test
    anotherChild: more value
  child3: something

When running the following command, the script prints an empty line:

$ tyaml tmenu/arquivo.yaml -k parentKey.child3

The output is:


childAgain
anotherChild

Note that tyaml is showing 3 results, one of them is empty.

A possible solution will be add an awk at the last echo of the script:

echo $output | awk /./