Implementation of grep by cuds