how to run linux command in rake file

Try backticks instead:

output = `grep -R 'time' oct_10.txt | grep -R 'hi' | wc`

backticks will return whatever went to stdout.

For system(), rtfm: Index of Files, Classes & Methods in Ruby 3.1.2 (Ruby 3.1.2)

Jeff p.s. Please don't say "reply ASAP" when posting. Everyone here is donating their free time and energy already. :slight_smile:

purpleworkshops.com

Fred Cheung wrote a little article on his blog about that;

"Things most likely to make me not reply to a message on a mailing list:

    This is urgent

    Plz reply ASAP"