From: Tim Hammerquist Date: 2002-07-02T09:10:35+09:00 Subject: Re: Question: ruby vs. ksh David Douthitt graced us by uttering: [ HTML-bloat snipped ] [ snip ] > Why should I use (or when should I use) ruby over ksh? > (Yes, I mean it :-) ruby is not a shell, though there is undoubtedly at least 1 or 2 ruby shell projects in progress right now. As far as using ruby for admin tasks, I've been using Ruby for 99% of my admin tasks since approx. 1 month after learning Ruby, and it's several times more graceful than ksh or any shell language for most tasks, IMHO. > PS: How do I do mkdir -p in ruby? Hmm. TMTOWTDI: # 1) system('mkdir -p foo/bar') # 2) 'foo/bar'.split('/').each do |dir| Dir::mkdir(dir) end # 3) require "ftools" # standard library File::mkpath('foo/bar') HTH Tim Hammerquist -- Note that by displacing from "I got confused" to "It got confused", the programmer is not avoiding responsibility, but rather getting some analytical distance in order to be able to consider the bug dispassionately. -- Jargon File 4.3.1