rust 写的命令行工具
工具名称
dtool
github地址
https://github.com/guoxbin/dtool
安装方式
$ cargo install dtool
用法示例
进制转换:
$ dtool ns 256
256
0b100000000
0o400
0x100
时间戳转日期:
$ dtool ts2d 10000
1970-01-01 10:46:40
hex转base58 check:
$ dtool h2b58c 0x0075774f5d9963c021009a58d7d2d8e83771dd6c7a
1Bi6zFVNtntP5MtDraNrAD7e469ifsQMwF
URL decode:
$ dtool ue a%2Bb
a+b
Compact解码:
$ dtool nd -tc 0x18
6
命令之间还支持管道: 比如把字符串转base64,可以通过拼接字符串转hex,hex转base64完成:
$ echo -n abc | dtool s2h | dtool h2b64
YWJj
本帖已被设为精华帖!
本帖由系统于 5年前 自动加精