bouzuya / rust-sandbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bejson: --trim-end を追加する

bouzuya opened this issue · comments

末尾の改行の除去が面倒なので --trim-end を追加し、末尾の空白を削除する。

$ echo '{"date":$`date "+%Y-%m-%d"`}' | bejson - 
{"date":"2021-05-29\n"}

$ echo '{"date":$`date "+%Y-%m-%d"`}' | bejson --trim-end - 
{"date":"2021-05-29"}

bejson 0.3.0 で対応済み。
560e773