# pipe data from some other process: some_matrix_program | getavg # or read data from some file: getavg matrix.file