mirror of
https://github.com/notwa/rc
synced 2024-11-05 08:19:03 -08:00
14 lines
178 B
Bash
14 lines
178 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 "$@"
|