mirror of https://github.com/notwa/rc
add sum function
This commit is contained in:
parent
48a0146e52
commit
9071e4b37d
|
@ -138,6 +138,14 @@ tw() {
|
|||
twitch "$@" OMFG STFU &
|
||||
}
|
||||
|
||||
sum() {
|
||||
local sum=0
|
||||
for i; do
|
||||
sum=$((sum+i))
|
||||
done
|
||||
echo "$sum"
|
||||
}
|
||||
|
||||
function {
|
||||
local t="${TERM%%-*}"
|
||||
if [ "$t" = xterm ] || [ "$t" = screen ] || [ "$t" = tmux ]; then
|
||||
|
|
Loading…
Reference in New Issue