From: Robert Klemme Date: 2013-07-03T01:44:12+09:00 Subject: Re: Backtick probleme --047d7b6da782f1c4e404e08a0d92 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Jul 2, 2013 at 4:26 PM, Josh Cheek wrote: > On Tue, Jul 2, 2013 at 8:54 AM, xcoder Blue_fox wrote: > >> Hey guys i got a probleme with this code : >> out = `ls` >> puts out >> >> When i run it i got : >> C:/Users/Xcoder/Documents/NetBeansProjects/Learnerr/lib/Sys.rb:1:in ``': >> No such >> file or directory - ls (Errno::ENOENT) >> from >> C:/Users/Xcoder/Documents/NetBeansProjects/Learnerr/lib/Sys.rb:1:in >> `
' >> Thanks for help ! >> >> > If your computer doesn't have an ls command, you can do the same thing > from Ruby with Dir.pwd > I guess you rather mean Dir.entries('.') or Dir["*"]. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ --047d7b6da782f1c4e404e08a0d92 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Tue, Jul 2, 2013 at 4:26 PM, Josh Cheek <josh.cheek@gmail.co= m> wrote:
On Tue, Jul 2, 2013 at 8:5= 4 AM, xcoder Blue_fox <lists@ruby-forum.com> wrote:
Hey guys i got a probleme with this code :
out =3D `ls`
puts out

When i run it i got :
C:/Users/Xcoder/Documents/NetBeansProjects/Learnerr/lib/Sys.rb:1:in ``'= :
No such
=A0file or directory - ls (Errno::ENOENT)
=A0 =A0 =A0 =A0 from
C:/Users/Xcoder/Documents/NetBeansProjects/Learnerr/lib/Sys.rb:1:in
=A0`<main>'
Thanks for help !


If your computer doesn't have an ls command, you can do the= same thing from Ruby with Dir.pwd

I guess you rather mean Dir.entr= ies('.') or Dir["*"].

Cheers

robert


--
remember.guy do |as, often| as.you_can - without endhttp://blog.rubybestpractic= es.com/
--047d7b6da782f1c4e404e08a0d92--