README ¶
dntk
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 Go 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 |
green | input function mode |
Current dntk's version: vvv1.0.11
Download Page: https://github.com/nnao45/dntk/releases/latest
Install
Mac
$ brew install nnao45/dntk/dntk
Linux
$ wget https://github.com/nnao45/dntk/releases/download/vvv1.0.11/dntk-linux-amd64-vvv1.0.11.tar.gz
$ tar xvfz dntk-linux-amd64-vvv1.0.11.tar.gz
zplug
$ zplug 'nnao45/dntk', as:command, from:gh-r
And...
$ echo 'alias bc=dntk' >> ~/.bashrc
$ echo 'alias bc=dntk' >> ~/.zshrc
All OK!! 😎
Option
$ dntk -h
usage: dntk [<flags>]
This application is command line's Interactive calculator, GNU bc wrapper.
Flags:
-h, --help Show context-sensitive help (also try --help-long and
--help-man).
-s, --scale=10 Number of truncated after the decimal point
-m, --maxresult=999 Number of truncated after the result number
-u, --unit=UNIT Set the unit of result
-w, --white Set non color in a output
-f, --fixed=FIXED Add the fixed statement
-a, --alias=ALIAS Add the custum alias
--version Show application version.
function input easy
dntk can use function.
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 |
example, if you want to write (123 + 2) * 3
, you type,
(
1
2
3
+
2
Enter
*
3
Enter
if you want to write a(123)
, you type,
a
1
2
3
Enter
Enter
if you want to writea(123) * c(678 * 123)
, you type,
a
1
2
3
Enter
*
c
6
7
8
*
1
2
3
Enter
Enter
very easy 😘
set fixed value
example, excange calculate AWS Billing, JPY -> USD, put fixed statement
set alias
you can use alias
$ dntk -a '<alias char>=<value>,<alias char>=<value>,...'
☝️ type,
x
*
y
*
y
you can write long long value very easy 😁
clean buffer
if you want to clean buffer, very easy, type r
Pipe use...
$ echo "123 * 2" | dntk | xargs echo
246
behave, like bc ☺️
Have a nice go hacking days✨😉
Writer & License
dntk was writed by nnao45 (WORK:Infrastructure Engineer, Twitter:@nnao45, MAIL:n4sekai5y@gmail.com).
This software is released under the MIT License, see LICENSE.