Mercurial > hgrepos > hgweb.cgi > s4
diff s4-funcs.sh @ 154:75598f2d3118
TEST: blog_showentry2 - constructing loop by output from single SQL
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 29 Dec 2015 09:50:35 +0859 |
parents | f7b4f7e5df2a |
children | 511406c0cbbe |
line wrap: on
line diff
--- a/s4-funcs.sh Tue Dec 22 15:26:43 2015 +0859 +++ b/s4-funcs.sh Tue Dec 29 09:50:35 2015 +0859 @@ -738,6 +738,16 @@ fi cat "$@" | $enascii } +size_h() { + i="$1" + set -- B KB MM GB TB + while [ $((i)) -gt 0 -a -n "$1" ]; do + oi=$i + i=$((i/1024)) + done + shift + echo ${oi}$1 +} gettblconf() { if [ -z "$tconfs" ]; then ## tconfs=`sq $db \