Imitates the grep functioanlity of hadoop