From: Xeno Campanoli Date: 2008-07-13T04:27:05+09:00 Subject: Re: can ruby replace bash scripts for linux script Marc Heiler wrote: >> 3. Loops are very flexible in Ruby. On the other hand, in Bash >> they may sometimes be more concise. > > > loop {} for d in $(ls $MYDIR/*) do echo "trace: $d" done versus Dir["#{MYDIR}/*"].each do |d| puts "trace: $d" end So, given the difference isn't much, I'd assert the first one is a little clearer. There are a lot of such examples. I think another aspect of where I'm at is that everybody knows Bash, and I did allude to that before. If you know people are gonna have to hack stuff, and your in a business, you try to provide the best environment for them to do so. I can certainly see it being reasonable to do practically everything in Ruby, however, and I wouldn't mind doing that if the work environment made it a reasonable way to go. xc > > > But I am curious what you mean specifically in bash. :) > > To be honest, maybe except for speed, I see 0 reason to use > bash scripts preferred over ruby scripts.