From: Daniel Carrera Date: 2003-05-02T11:51:11+09:00 Subject: Re: Search string in a file On Fri, May 02, 2003 at 10:04:09AM +0900, Panther wrote: > I must search string in a file ?? > How I must open file in read and search string ?? > What is syntax ?? > Thamk you Is this what you want?: dcarrera ~ $ cat > file cat dog mouse eagle dcarrera ~ $ irb >> File.readlines("file").each { |line| puts line if line =~ /o/ } dog mouse >> -- Daniel Carrera Graduate Teaching Assistant. Math Dept. University of Maryland. (301) 405-5137