What can Ruby do that Python can't

The German Python forum

Post Tue Mar 29, 2011 12:20 pm

Hello everybody,

I thought, before I get lost in half-knowledge at best, I'll ask the professionals

I am a Linux system administrator and with my bash scripting I keep running into problems that I would not have with a "real" scripting language. With Bash, for example, you often have to resort to system programs such as "sort", "sed" or "grep", which actually fulfill all the functions that common programming languages ​​already have as modules or basic skills. Here, however, I keep running into problems that result from minimally different command line options. Under Suse Linux 9, for example, "-v" ensures that the output is informative, but under Ubuntu 10.04 it only outputs one version, or the standard behavior has completely changed, or, or, or. In short: I want to learn a "real" programming language because of the increasing number of unnecessary problems in Bash

Python and Ruby actually seem to target approximately the same target groups and areas of application. Since I am still at the very beginning and have to learn one or the other language from scratch, I thought I should ask if someone can tell me the advantages and disadvantages (at least from a Python point of view) between the two languages can. I would ask you to really arrange the whole thing in the context of a comparison of the two; Statements like "Python can XYZ" don't do me as much as "Python can XYZ, Ruby can only do XY" (or the other way around)

Has anyone, for similar / identical reasons, decided on Python (to replace Bash) and can tell me what worked very well and what didn't work at all?

Thank you in advance!