python(2) is not available on newer systems
This commit is contained in:
parent
ed2b1031c2
commit
de72afe6eb
|
@ -60,7 +60,7 @@ if [ ! -z "$PS1" ]; then
|
||||||
echo -n "heap size "
|
echo -n "heap size "
|
||||||
[[ "$(ulimit -d)" == "unlimited" ]] \
|
[[ "$(ulimit -d)" == "unlimited" ]] \
|
||||||
&& echo "unlimited" \
|
&& echo "unlimited" \
|
||||||
|| echo $(python -c \
|
|| echo $(python3 -c \
|
||||||
"import math; \
|
"import math; \
|
||||||
size=$(( 1024*$(ulimit -d) )); \
|
size=$(( 1024*$(ulimit -d) )); \
|
||||||
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
||||||
|
@ -68,7 +68,7 @@ if [ ! -z "$PS1" ]; then
|
||||||
echo -n "stack size "
|
echo -n "stack size "
|
||||||
[[ "$(ulimit -s)" == "unlimited" ]] \
|
[[ "$(ulimit -s)" == "unlimited" ]] \
|
||||||
&& echo "unlimited" \
|
&& echo "unlimited" \
|
||||||
|| echo $(python -c \
|
|| echo $(python3 -c \
|
||||||
"import math; \
|
"import math; \
|
||||||
size=$(( 1024*$(ulimit -s) )); \
|
size=$(( 1024*$(ulimit -s) )); \
|
||||||
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
||||||
|
|
|
@ -50,7 +50,7 @@ if [ ! -z "$PS1" ]; then
|
||||||
echo -n "heap size "
|
echo -n "heap size "
|
||||||
[[ "$(ulimit -d)" == "unlimited" ]] \
|
[[ "$(ulimit -d)" == "unlimited" ]] \
|
||||||
&& echo "unlimited" \
|
&& echo "unlimited" \
|
||||||
|| echo $(python -c \
|
|| echo $(python3 -c \
|
||||||
"import math; \
|
"import math; \
|
||||||
size=$(( 1024*$(ulimit -d) )); \
|
size=$(( 1024*$(ulimit -d) )); \
|
||||||
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
||||||
|
@ -58,7 +58,7 @@ if [ ! -z "$PS1" ]; then
|
||||||
echo -n "stack size "
|
echo -n "stack size "
|
||||||
[[ "$(ulimit -s)" == "unlimited" ]] \
|
[[ "$(ulimit -s)" == "unlimited" ]] \
|
||||||
&& echo "unlimited" \
|
&& echo "unlimited" \
|
||||||
|| echo $(python -c \
|
|| echo $(python3 -c \
|
||||||
"import math; \
|
"import math; \
|
||||||
size=$(( 1024*$(ulimit -s) )); \
|
size=$(( 1024*$(ulimit -s) )); \
|
||||||
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
|
||||||
|
|
Loading…
Reference in New Issue