Bash for loop and arithmatic
Hi!
I am running the following bash script:
#!/bin/bash
for i in $(grep "Query time" qt.txt | awk '{print $12}');
do
echo $i
done
and I am getting results on query times, eg 3, 5, 4, 2 etc.
How can I now add up these results as well as get a count of the number of results?
please help the newbie!
|