dntk is command line's Interactive calculator, GNU bc wrapper.
✔︎ dntk means calculator in a japanese.
✔︎ dntk is gnu bc wrapper. so, syntax is equal to gnu bc. learn syntax more
✔︎ dntk is a NATIVE The Rust Programming Language application.
✔︎ dntk write color means,
color | means |
cyan | can caluclate & can output |
megenta | can't caluclate, can't output |
yellow | danger input char, output warning |
Download Page: https://github.com/nnao45/dntk/releases/latest
bash
$ brew install nnao45/dntk/dntk
bash
$ wget https://github.com/nnao45/dntk/releases/download/v2.0.1/dntk-linux-amd64-v2.0.1.tar.gz
$ tar xvfz dntk-linux-amd64-v2.0.1.tar.gz
bash
$ zplug 'nnao45/dntk', as:command, from:gh-r
bash
$ echo 'alias bc=dntk' >> ~/.bashrc
$ echo 'alias bc=dntk' >> ~/.zshrc
All OK!! 😎
key | feature |
[ | cursor move to left |
] | cursor move to right |
you can use under function.
function | command | detail |
(x) | () | Simple round bracket |
sin(x) | s() | Sin of trigonometric function |
cos(x) | c() | Cosin of trigonometric function |
atan(x) | a() | Tangent of inverse trigonometric function |
log(x) | l() | Logarithm function |
exp(x) | e() | Exponential function |
j(n,x) | j() | The n-order Bessel function |
more detail 👉 https://www.gnu.org/software/bc/manual/html_mono/bc.html
if you want to clean buffer, very easy, type r
bash
$ echo "123 * 2" | dntk | xargs echo
246
behave, like bc ☺️
Have a nice rust hacking days:sparkles::wink:
dntk was writed by nnao45 (WORK:Infrastructure Engineer, Twitter:@nnao45, MAIL:n4sekai5y@gmail.com).
This software is released under the MIT License, see LICENSE.