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