Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anyway we could use this with realtime rendering? For eg: I pipe data from top command to this script to see graphs/charts change it dynamically?


    watch -n1 ./barchart -w 80 data


You would probably need a wrapper script to do this. The script could periodically clear the screen and call "barchart" with the new input data, re-rendering the chart from scratch.

"barchart" is a very simple shell script that doesn't do much on its own.


Slightly relevant: The program "htop" displays CPU usage with bars on the command line. https://htop.dev/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: