On Fri, 24 Aug 2007, Robert Klemme wrote: > 2007/8/23, Daniel Aquino <mr.danielaquino / gmail.com>: >> It's not just arrays... lots of things are a pain.. > > Sorry, I find that too unspecific. Bash is great for what it's > intended to do. It's not a general purpose programming environment > but rather a scripting engine for day to day admin tasks. Maybe you > used the wrong hammer for your nail? :-) * Quoting in shell is hell. * "A = 11" is a syntax error. WTF! * "A=1; echo $A". Why once A and the other time $A? To make you weep? * "ls 2>&1". Again: why is a filedescriptor once a number only and the other time has an ampersand in front? Such things give me nausea. * for i in "all files that contain a star". How long do you have for that? 30min? Less? More? * arithmetics?!?!?! * I could go on and on Now why would a Ruby shell be wonderful? To reply to that, we need to know what's so nice about a shell: * files are first class: "ls > /tmp/kak", how nice! * pipes * backticks: "cat `ls|grep *family*`" * 0=true, !0=error_code * fileglobs * ... How about being able to do these things with a Ruby DSL? Like: for lines in </etc/passwd> { line.split.map ... } > /tmp/passwd.changed h = Hash.new < `ls #{my_dir}`.special_sort | `tee /tmp/temp_copy` That would be nice. The shell would need to be interactive and non-interactive... *t -- ----------------------------------------------------------- Tomas Pospisek http://sourcepole.com - Linux & Open Source Solutions -----------------------------------------------------------