1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/linux/ttyplot.md

21 lines
649 B
Markdown
Raw Normal View History

2021-10-14 05:31:36 +02:00
# ttyplot
2023-05-30 20:37:28 +02:00
> A realtime plotting utility for the command-line with data input from `stdin`.
2021-10-14 05:31:36 +02:00
> More information: <https://github.com/tenox7/ttyplot>.
- Plot the values `1`, `2` and `3` (Note: `cat` prevents `ttyplot` from exiting):
2021-10-14 05:31:36 +02:00
`{ echo {{1 2 3}}; cat; } | ttyplot`
2021-10-14 05:31:36 +02:00
- Set a specific title and unit:
`{ echo {{1 2 3}}; cat; } | ttyplot -t {{title}} -u {{unit}}`
2021-10-14 05:31:36 +02:00
- Use a while loop to continuously plot random values:
`{ while {{true}}; do echo {{$RANDOM}}; sleep {{1}}; done } | ttyplot`
- Parse the output from `ping` and visualize it:
`ping {{8.8.8.8}} | sed -u '{{s/^.*time=//g; s/ ms//g}}' | ttyplot -t "{{ping to 8.8.8.8}}" -u {{ms}}`