mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
add sum function
This commit is contained in:
parent
48a0146e52
commit
9071e4b37d
1 changed files with 8 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue