Marcin Kulisz wrote:
> Jan Svitok wrote:
> 
>> #!/usr/bin/ruby -w
>> 
>> usr = ARGV[0]
> ...
>> puts appends \n, if you don't like it, use print
> 
> thx a lot, I was very close to it but had probles with grep, first I 
> tired to do it with command "system" but it doesn't working then change 
> my mind & tired with method ".grep" & it doesn't work too but your 
> solution is easy & lovely
> again thx for help

Just for future reference (and I found this out the hard way by having 
it not working on me either) the 
system("insert_your_shell_command_here") method will return a boolean if 
your shell can execute the command (1 or 0, true or false).  You can use 
the grep command, but as you saw in the solution, you use backticks ` ` 
to have system commands in your ruby script.

Best regards,

Eckie


-- 
Posted via http://www.ruby-forum.com/.