From: Jamis Buck Date: 2004-06-21T00:45:25+09:00 Subject: Re: Subprocesses on UNIX/Linux Meino Christian Cramer wrote: > Hi, > > How can I call a subprocess ( like "ls -l" ) and get back the output > of that process without creating temporary files ? > > "Exec" does not work for me, since it will not return, > and "system" returns, but only with "true" or "flase" in its > luggage... > > Any help is very appreciated ! :O) > > Kind regard, > Meino > > > . > Use backticks: a = `ls -l` -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis ruby -ropenssl -e'k="01234567";p((c,c.padding,c.iv,c.key=OpenSSL::Cipher::BF.new,0,k,k*2)[0].decrypt.update("1A81803C452C324619D319F980D5B84DBB45FC0FE2BAA045".scan(/../).map{|n|n.to_i(16).chr}.join))'