dotfiles/.local/bin/scripts/cj

6 lines
238 B
Plaintext
Raw Normal View History

2021-01-23 19:23:40 +00:00
#!/bin/sh
2021-07-29 14:02:20 +00:00
# [c]at the given files as prettified [j]son
2022-07-18 10:56:48 +00:00
# add echo in case file is missing newline at the end
{ cat "$@"; echo; } | while read -r line; do echo -n "$line" | python3 -m json.tool; done | bat --language json --style numbers