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: http://ruby-doc.org/core/

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;
http://spacevatican.org/2008/11/20/asap

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

    This is urgent

    Plz reply ASAP"