Closed berqavos closed 10 years ago
very well. thanks.
just a quick note, I've changed your code a bit. see: https://github.com/azet/community_bash_style_guide/commit/6807c491157d8f7d8d9ce2fafc8b1ce77718cd01
printf
should be used like a printf
statement in any other language (i.e. don't pass stuff directly, but with proper formatting, i.e. as string, int, float,..). readonly
is pretty much reserved for constants, since batterystatus is something that might change over time, I've replaced this with the usual variable assignment.
BTW: the way that this works is that the output of a subshell is directly passed into the assignment of a variable, it's not a replacement for cat
in all cases, but can usually be used to replace cat
for passing stuff into variables.
ok, thx.
found a small typo under section printf and added new section "you dont't need cat"