new line separator for each grep result sh script [closed]

Is there a way to have each result of grep followed by newline for example if the result of grep is:

1
2
3

I need it to be:

1
2
3
3

1 Answer

grep "pattern" /path/to/file | awk '{print $0,"\n"}'
2

You Might Also Like