/btecho

Small command-line tool for writing a sequence of numbers as a binary tree in ascii

Primary LanguageCMIT LicenseMIT

btecho

Write integer arguments as a binary tree to the standard output.

Installation

$ make && make install

Examples

$ echo 7 3 2 9 10 4 5 1 8 6 | btecho
|- 7
   |- 9
   |  |- 10
   |  |- 8
   |- 3
      |- 4
      |  |- 5
      |     |- 6
      |- 2
         |- 1
$ seq 5 | gshuf | tee /dev/tty | btecho
3
4
1
2
5
|- 3
   |- 4
   |  |- 5
   |- 1
      |- 2