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 !

Jack

···

-----Original Message-----
From: William Djaja Tjokroaminata [mailto:billtj@y.glue.umd.edu]
Sent: Monday, September 16, 2002 3:32 PM
To: ruby-talk@ruby-lang.org
Subject: Re: back tick equivalent

Hi,

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”.

Regards,

Bill

“CHENG, WEI CHI (LNG)” WEICHI.CHENG@lexisnexis.com wrote:

Just install ruby last Friday and tried to find the back tick equivalent
as
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;