Update below... On Tue, 21 Nov 2000, Hal E. Fulton wrote: ... > ----- Original Message ----- > From: Niklas Backlund <d99-nba / nada.kth.se> > > > > I'm reading The Book, and I was trying out %x{dir} et al on > > page 75... but all I get is: > > > > test.rb:1: command not found: dir ... > > I also tried to use IO.popen -- Same deal! > > > > I'm running > > > > ruby 1.6.2 (2000-11-04) [i386-cygwin] > > > > under Win98... Any ideas? ... > Windows/DOS isn't UNIX, of course. The command > "dir" is not an executable, but a built-in to the shell. > I have a vague memory in the COMMAND.COM > days of using a string like "command /c dir" from > within a C program. I think it's called CMD.EXE > nowadays; I tried something similar a day or two ago, > but with no luck. Nope, didn't work that way either... But here something else: I tried it on my laptop, which is running Win95 and ruby 1.6.2 (2000-10-11) [i386-mingw32] and everything works just like it should, i e %x{dir}, IO.popen("dir") ... !! Question is, is it the Ruby version or the Windows version that causes the problem? Note that I'm running cygwin version on this box and mingw32 on the laptop. ??? /Niklas