Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It seems to me that Ruby is far more powerful, and you can also do more powerful scripting with it.

Are there any open source implementations out there that could replace Bash with Ruby on Ubuntu, so that you can use Ruby instead of Bash commands.

Like a Ruby shell instead the Bash shell.

share|improve this question

migrated from Aug 31 '10 at 1:44

This question came from our site for professional and enthusiast programmers.

how are you going to do ls? – hasen Aug 28 '10 at 11:50
A question for – Merlyn Morgan-Graham Aug 28 '10 at 12:03
@hassen: thats why im looking to a shell-specific ruby implementation. Maybe they have their own methods. But in this case, i can combine things better if it's all the same language. – ajsie Aug 28 '10 at 12:14
@hasen in irb: Dir.entries('.') :) – Ziggy Jul 31 '12 at 5:41
up vote 9 down vote accepted

You may look on this project:

share|improve this answer
That is exactly what i mean. – ajsie Aug 28 '10 at 12:16
It isn't though: @ajsie, how are you liking rush? I tried it and found it unusable. On the other hand, just using irb seems like (with a bit of tweaking) it might actually work. – Ziggy Jul 31 '12 at 5:42

You wouldn't want to do that. It would mean, for example, putting all arguments passed on to programs in double quotes. (ipython, which resembles ruby's irb, can do something like this, but it's cumbersome) Although I agree that bash and co are not great, they can't just be replaced, as an interactive prompt at least, by a general-purpose programming language.

share|improve this answer
Yes they can...its just a matter of time :) Look at my comment above. – ajsie Aug 29 '10 at 3:20

I've seen some attempts, but it's not something that's all that useful. If you want to do something in Ruby, you can just fire up IRB. Rarely, I do this to iterate over some files and rename them in some non-trivial way or something.

As for scripting, well, just write Ruby scripts.

share|improve this answer
I really hope in the future ruby can replace bash and more corporates are embracing this. I want to cut out bash entirely. – ajsie Aug 28 '10 at 14:38
Bash is esoteric, quirky and generally a pain to write scripts with. I've written some large, non-trival programs in Bash. I never want to do that again. However, I have no problem using Bash on the command line. Even some basic loops and such aren't hard. But no one is forcing you to write your scripts in Bash, so do we really need an under-maintaned, DSL-heavy Ruby shell? – AboutRuby Aug 28 '10 at 19:49
@AboutRuby. If Ruby was de-facto shell for Linux, then yes, it would be more lovely to use. Cause you can see what it returns. You can inspect the return object, see what class it is, what superclass it has, you can see what methods it contains etc. You are already using ruby to script, you can use it for web applications, for your Mac (rb-appsrcript). Bash is outdated and so yesterday of doing stuff. If you could choose between ruby and bash shell when you install ruby, then it would be great, not having to implement ruby on top of bash, but having ruby classes to communicate with linux. – ajsie Aug 29 '10 at 3:17
Bash is just a toolbox with a bunch of tools they threw inside, not following the same pattern and so on. Just like PHP. Yes, everyone is using it today, but that doesn't mean that we actually like it. – ajsie Aug 29 '10 at 3:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.