Is there a way to achieve grep like functionality on output inside the Rails Console

Viewed 6463

In shell, I can do

$ cat name_of_file_with_a_lot_of_text | grep "What I am looking for"

Inside the Rails Console, can I achieve something similar, say when I run a command and the output is huge, especially say a DB query.

I am aware of outputting it as YAML but that Is not what I am looking for.

Thanks.

2 Answers
Related