From: Nat Pryce Date: 2002-01-23T01:29:13+09:00 Subject: Re: Windows ruby(cygwin version) Command Expansion Problem The 'dir' command is implemented by the command-line shell on Windows, and is not a separate program. So, you need to pass pass the arguments '/c dir' to the command interpreter. The name of the command interpreter is different on different versions of Windows, but luckily is stored in the COMSPEC environment variable. So, to execute the 'dir' command, you have to use: `ENV["COMSPEC"] /c dir` Cheers, Nat. ________________________________ Dr. Nathaniel Pryce B13media Ltd. 40-41 Whiskin St, London, EC1R 0BP, UK http://www.b13media.com ----- Original Message ----- From: "Songsu Yun" Newsgroups: comp.lang.ruby To: "ruby-talk ML" ; Sent: Tuesday, January 22, 2002 3:52 PM Subject: Windows ruby(cygwin version) Command Expansion Problem > Hi, > I posted the same question last night but for some reason it disappeared. > I am new to ruby, so this might be a stupid question. > When I use command expansion `dir` in cygwin version of ruby, I get "command > not found: dir". > I downloaded version 1.6.5 ruby for Windows from www.rubycentral.com. > I built mswin32 ruby version 1.6.6 and command expansion works fine there. > I tested it under Windows 98 and Windows 2000 professional edition. > Does cygwin version of ruby support command expansion ? > Thanks in advance. > > >