News for hackers. Stuff that matters.
Re:Bash-Fu by billybob on Thursday March 24, 2011 @06:58AM (#2363549)
You know, I work at the command line all day, and I'm always happy to learn a new trick. But for writing actual scripts, I'd much rather write in Ruby. I don't want to have to use awkward syntax like case statements ending with "esac."

Yes, using Ruby introduces a dependency beyond Unix. But I already use lots of libraries (Rails, Rspec, etc) and tools (ImageMagick, Ghostscript), so I don't see that as a problem, just part of the job.

Re:Bash-Fu by wladimir on Thursday March 24, 2011 @07:49AM (#2363633)
Indeed, I've long ago adopted the convention to do any remotely advanced scripting in a "real" scripting/programming language (myself, I use Python for this).

Bash scripting is good for running a few commands in a sequence, but in my experience gets unmaintainable and unreadable very quickly, especially if you try to do sane error handling/logging, or operations on non-text data.

Re:Bash-Fu by billybob on Thursday March 24, 2011 @07:54AM (#2363643)
Agreed. Although I should add that it's still great to call out to the standard Unix toolset when it's the easiest way to get something done. The accepted answer here illustrates that: http://stackoverflow.com/questions/4714043/what-is-the-best-...
Re:Bash-Fu by JonnieCache on Thursday March 24, 2011 @08:12AM (#2363675)
A quick...

    require 'fileutils'
    include FileUtils
...and you can almost pretend you are writing bash.

http://ruby-doc.org/stdlib/libdoc/fileutils/rdoc/index.html

Re:Bash-Fu by krainboltgreene on Thursday March 24, 2011 @11:05AM (#2364360)
FileUtils is a step back as far as I'm concerned. In fact, all the file-stuff is both ill-documented and anti-ruby-readability.