wget https://github.com/jpmens/jo/releases/download/1.6/jo-1.6.tar.gz
tar xvzf jo-1.6.tar.gz
cd jo-1.6
autoreconf -i
./configure
make check
make install
jo name=Jane
seq 1 10 | jo -a
jo time=$(date +%s) dir=$HOME
jo -p -a spring summer winter
jd
json 比较工具
https://github.com/josephburnett/jd
go install github.com/josephburnett/jd@latest
jd a.json b.json
gron
json 数据格式化
https://github.com/TomNomNom/gron
go install github.com/tomnomnom/gron@latest
gron test.json
jless
命令行的json查看工具
https://jless.io/
html
htmlq
像 jq 一样对 html 使用 yq
https://github.com/mgdm/htmlq
图像视频
imcat
在终端显示任何图片
https://github.com/stolk/imcat
git clone https://github.com/stolk/imcat.git
make
./imcat xxx.png
bc # 进入交互模式,输入 quit 退出
# e.g.
echo "15+5" | bc
echo "10^10" | bc
echo "sqrt(100)" | bc
echo 'scale=2; (2.777 - 1.4744)/1' | bc # scale=2 设小数位,2 代表保留两位:
./wait-for www.eficode.com:80 -- echo "Eficode site is up"
Eficode site is up
wait-for-it
监测服务是否可用
https://github.com/vishnubob/wait-for-it
./wait-for-it.sh -t 0 db:3306 -- echo "mysql is up"
./wait-for-it.sh -t 0 rabbitmq:5672 -- echo "rabbitmq is up"
yes
帮你自动回答命令行提示
yes | rm -i *.test
yes n | rm -i *.test
usql
多合一命令行下数据库管理工具
https://github.com/xo/usql
GO111MODULE=on go install -tags 'all' github.com/xo/usql@latest
# 或
go install github.com/xo/usql@master
# connect to a postgres database
$ usql pg://user:pass@host/dbname
$ usql pgsql://user:pass@host/dbname
$ usql postgres://user:pass@host:port/dbname
$ usql pg://
$ usql /var/run/postgresql
$ usql pg://user:pass@host/dbname?sslmode=disable # Connect without SSL
# connect to a mysql database
$ usql my://user:pass@host/dbname
$ usql mysql://user:pass@host:port/dbname
$ usql my://
$ usql /var/run/mysqld/mysqld.sock
# connect to a sqlserver database
$ usql sqlserver://user:pass@host/instancename/dbname
$ usql ms://user:pass@host/dbname
$ usql ms://user:pass@host/instancename/dbname
$ usql mssql://user:pass@host:port/dbname
$ usql ms://
# connect to a sqlserver database using Windows domain authentication
$ runas /user:ACME\wiley /netonly "usql mssql://host/dbname/"
# connect to a oracle database
$ usql or://user:pass@host/sid
$ usql oracle://user:pass@host:port/sid
$ usql or://
# connect to a cassandra database
$ usql ca://user:pass@host/keyspace
$ usql cassandra://host/keyspace
$ usql cql://host/
$ usql ca://
# connect to a sqlite database that exists on disk
$ usql dbname.sqlite3
# NOTE: when connecting to a SQLite database, if the "<driver>://" or
# "<driver>:" scheme/alias is omitted, the file must already exist on disk.
#
# if the file does not yet exist, the URL must incorporate file:, sq:, sqlite3:,
# or any other recognized sqlite3 driver alias to force usql to create a new,
# empty database at the specified path:
$ usql sq://path/to/dbname.sqlite3
$ usql sqlite3://path/to/dbname.sqlite3
$ usql file:/path/to/dbname.sqlite3
# connect to a adodb ole resource (windows only)
$ usql adodb://Microsoft.Jet.OLEDB.4.0/myfile.mdb
$ usql "adodb://Microsoft.ACE.OLEDB.12.0/?Extended+Properties=\"Text;HDR=NO;FMT=Delimited\""
# connect with ODBC driver (requires building with odbc tag)
$ cat /etc/odbcinst.ini
[DB2]
Description=DB2 driver
Driver=/opt/db2/clidriver/lib/libdb2.so
FileUsage = 1
DontDLClose = 1
[PostgreSQL ANSI]
Description=PostgreSQL ODBC driver (ANSI version)
Driver=psqlodbca.so
Setup=libodbcpsqlS.so
Debug=0
CommLog=1
UsageCount=1
# connect to db2, postgres databases using ODBC
$ usql odbc+DB2://user:pass@localhost/dbname
$ usql odbc+PostgreSQL+ANSI://user:pass@localhost/dbname?TraceFile=/path/to/trace.log
croc
Easily and securely send things from one computer to another