mirror of
https://github.com/notwa/rc
synced 2024-11-05 06:49:03 -08:00
14 lines
185 B
Bash
14 lines
185 B
Bash
#!/usr/bin/env sh
|
|
# YES_ZSH
|
|
# YES_BASH
|
|
# YES_DASH
|
|
|
|
sum() { ### @-
|
|
local sum=0
|
|
for i; do
|
|
: $((sum+=i))
|
|
done
|
|
echo "$sum"
|
|
}
|
|
|
|
[ "${SOURCING:-0}" -gt 0 ] || sum "$@"
|