计算pi:
time (echo "scale=500;4*a(1)"|bc -l -q)
#!/bin/bash
for i in `seq 1 1000`
do
(time echo "scale=5000; 4*a(1)" | bc -l -q |grep ‘real‘) 2>> pi.log
done
时间: 2024-10-20 14:28:51
计算pi:
time (echo "scale=500;4*a(1)"|bc -l -q)
#!/bin/bash
for i in `seq 1 1000`
do
(time echo "scale=5000; 4*a(1)" | bc -l -q |grep ‘real‘) 2>> pi.log
done