💾 Archived View for gemini.jorl.fi › gemlog › stdu-release.gmi captured on 2024-05-12 at 15:06:11. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-05-10)
-=-=-=-=-=-=-
I use output redirection and piping quite a bit when I'm using my computer. Oftentimes I just `cat` and redirect the output instead of using `cp` or `dd`. I don't remember when I'd have done `grep [foo-query] [bar-file]`, I always do `cat [bar-file] | grep [foo-query]`. I might end up writing more, but I don't have to remember as much syntax.
What I was missing was some kind of progress bar which for example `dd` can offer. That's why I wrote `stdu` (standing for STDIN data usage, obviously), a program that prints out the amount of data piped to its STDIN. You can find its source on my website:
or you can clone it by doing
git clone "https://jorl.fi/git/stdu.git"
`stdu` is written in C and I'd love to get feedback and suggestions both on the source code and the program and its usability at joel dot kronqvist at iki dot fi. I'm aware that the config parsing is quite a mess, so I will probably write a more elegant system for it at some point. I'm also planning to add an option for output forwarding, maybe like
cat foo | stdu --forward | /dev/sdb1`
because using `stdu` with `tee` is basically useless as `tee` seems to send its output at independent paces to its STDOUT and the specified file.