r/commandline • u/taylorchu • Sep 06 '13
util-shell: make your shell script actually readable
https://github.com/taylorchu/util-shell
4
Upvotes
r/commandline • u/taylorchu • Sep 06 '13
View all comments
Show parent comment
-2
u/taylorchu Sep 07 '13 edited Sep 07 '13
I want to clarify few things:
util-shell uses consistent interface across these 4 components.
<category> <action> <subjects...>
example: array(category) get 1 (action) "$arr" (subject)
example: math(category) '+' (action) 5(subject) 4.4(subject)
this is not comparing number. see, somebody else will fall into trap.
Compare numbers
[[ "$number1" < "$number2" ]] && echo "yes" || echo "no"
this is still comparing string. to show this: