Back tick equivalent

Thanks all for the reply ! This is just what I want and I can even locate
the place in document where this is mentioned after your pointer :-))

just want to write script using whatever system provides before I
familiarize all the library classes & functions provided by ruby.

Thanks again !



-----Original Message-----
From: William Djaja Tjokroaminata []
Sent: Monday, September 16, 2002 3:32 PM
Subject: Re: back tick equivalent


What is your platform? At least on linux, I could do

puts `ps -elf | grep myusername`

In the pickaxe book, it is documented under Chapter “Built-in Classes and
Methods” in the Section “module Kernel” with method name “backquote”.



“CHENG, WEI CHI (LNG)” wrote:

Just install ruby last Friday and tried to find the back tick equivalent
in shell script or perl to get the program output w/o resort to some popen
trickery. Can not find it in the reference book or faq ?

e.g. what is the equivalent of below perl statement

@psout = ps -elf | grep myusername;