dotfiles/.local/bin/csview

9 lines
219 B
Plaintext
Raw Normal View History

2022-05-29 22:36:19 +02:00
#!/bin/bash
2022-06-08 21:23:51 +02:00
# csview
#
# A very simple and crude terminal CSV viewer - nothing more.
2022-05-29 22:36:19 +02:00
file="${1:?}" || exit 1
2022-05-29 22:44:21 +02:00
sed -e 's/,,/, ,/g' "$file" | column -s, -t | less -#5 --LINE-NUMBERS --chop-long-lines --RAW-CONTROL-CHARS