./your_command | tee log
grep "name ELASTIC Nb. local dof" log | grep "rank = 0" | grep "row" | awk '{print $25}'