On 14 Aug 2007, at 12:00, Jon Hawkins wrote:

> Worked like a charm, but i have yet one more question for you :)
>
> if i wanted to run it like this:
>
> find /etc/ -type f | ./program.rb
> #####
> how would i get it to the ./program.rb  state
> friend gave me the clue of the numbers 699 - 756.
> I have no idea what that relates to.
>
> Thanks a ton
> -Jon
>
> --  
> Posted via http://www.ruby-forum.com/.
>

Make program.rb executable and set the shebang line correctly? E.g:

[alexg / powerbook]/Users/alexg(7): cat hi.rb
#!/usr/local/bin/ruby
puts 'hi'
[alexg / powerbook]/Users/alexg(8): ruby hi.rb
hi
[alexg / powerbook]/Users/alexg(9): ./hi.rb
tcsh: ./hi.rb: Permission denied.
[alexg / powerbook]/Users/alexg(10): chmod u+x hi.rb
[alexg / powerbook]/Users/alexg(11): ./hi.rb
hi

Not sure about your friends hint. At first I thought they were the  
octal chmod strings for making files executable, but unless I'm  
missing something they don't seem to be...

Alex Gutteridge

Bioinformatics Center
Kyoto University