1d_tool to get mean of the last line