Fix program to work on pipelining with other programs

As grep