On Jan 29, 2006, at 10:23 AM, James Edward Gray II wrote:
> This is my port of File::ReadBackwards.
I just noticed that everyone provided sample usage (just as I asked
them too), but me! Egad. Here's Elif at work:
$ cat sample_data.txt
This is line one.
This is line two.
This is line three.
...
$ ruby -r elif -e 'puts Elif.readlines(ARGV.first)' sample_data.txt
...
This is line three.
This is line two.
This is line one.
$ ruby -r elif -e 'Elif.foreach(ARGV.first) { |line| puts line if
line =~ /t[a-z]+.$/ }' sample_data.txt
This is line three.
This is line two.
James Edward Gray II