Is my bash file stupid, can it be simplified?
I made a couple pipe menus for Openbox over the last couple of days, which was fun as I knew nothing about bash previously. One displayed the output of df but it seems a limit to menu width undermined this. This one, on the other hand, works like a dandy for me. I don't understand entirely how it works, so for the sake of my own bash/awk education, I ask you, can it be simplified without using bc or acpi or something else I might not have installed?
Code:
#!/bin/sh |
All looks pretty sensible to me. Might just want to change the first line to:
Code:
#!/bin/bash |
I also recommend using $() instead of back ticks ``, as they are deprecated and will be removed at some point in the future.
|
All times are GMT -5. The time now is 03:00 PM. |