On Mon, Dec 31, 2012 at 02:05:48PM +0700, Comrade DOS wrote:
> You mad, bro? Use bash! Stay higher when you can.

There are good reasons to do this in C. I work on a system with very
limited battery life and CPU power, but I want to update the status bar
once a second for various reasons.

There's a huge performance boost gained by having Having a single C 
program that can do it with just a handful of system calls (almost all of 
which are just reading a whole file in a single read()) and no memory
allocations, instead of spawning a couple of dozen processes to get
everything formatted correctly with bash every time it updates.

Bash is my go-to for system scripting, but for something that will run
100% of the time on my system for years it's not over-engineering to do
it efficiently.

Reply via email to