jQuery in Action, 2nd edition*
The moose likes Linux / UNIX and the fly likes Perl Vs Python/Ruby Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Perl Vs Python/Ruby" Watch "Perl Vs Python/Ruby" New topic
Author

Perl Vs Python/Ruby

Bobby Sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 550
    
    1

I am not going to start debate here but just want to ask can
we use Ruby/Python for shell scripting ,replacing Perl?

I know Perl is quite powerful for doing that Job but it's ugly than C.
I worked in pearl a little but don't like it much.

I am Java programmer so in future learning Ruby and Python will
be great for me as Java have good integration with both languages.

However,I found a Perl integration library but I don't think it's
effective for web application and job market.

so please get me imbibed

best regards,
[ November 17, 2008: Message edited by: omi sharma ]

Back to Java , again.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Perl = Practical Extraction and Reporting Language

The correct spelling is Perl. There is no 'a' character in the name.

can we use Ruby/Python for shell scripting ,replacing pearl?


You can use Ruby or Python for scripting, not Shell scripting however. These are not Shell-based languages.
Bobby Sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 550
    
    1

LOL, thank for correction.

What I am asking is can we use Ruby/Python for system adminstration
in Linux.?

if yes,how powerful they are as compared to language Perl when
it comes system administration.

best regards,
omi
[ November 17, 2008: Message edited by: omi sharma ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Originally posted by omi sharma:

What I am asking is can we use Ruby/Python for system adminstration
in Linux.?


Yes, absolutely. Both Ruby and Python are able competitors to Perl, and personally of the three, I like Perl the least.


[Jess in Action][AskingGoodQuestions]
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4639
    
    5

Originally posted by James Clark:
You can use Ruby or Python for scripting, not Shell scripting however. These are not Shell-based languages.


What do you mean here? Perl is not inherited from cshell/bash/bourn/sh

Do you just mean that you can't shebang python code?
Bobby Sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 550
    
    1

Thanks for your time
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15657
    
  15

Anaconda - the system configuration utility that runs whenever a Red Hat Linux (or compatible) system boots is a shell script written in Python. So are most of the support scripts for the Xen Virtual Machine facility. Among other things, that means that you can pretty well count on Python being available.

A lot of people prefer Python to Perl because of Perl's unfortunate reputation for "write-only" code.

These days, I tend to use Perl mostly for tasks that depend a lot on pattern matching and Python for more general scripting.


Customer surveys are for companies who didn't pay proper attention to begin with.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4639
    
    5

Originally posted by Tim Holloway:
A lot of people prefer Python to Perl because of Perl's unfortunate reputation for "write-only" code.


And its a well earned reputation.

One crack that I've heard recently is that Python programmers tend to be smarter than Java programmers. Just because every one's mother has heard of Java and tells little Johnnie to "become a Java programmer and make big bucks" whereas no one knows what Python is other than geeks.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
...whereas no one knows what Python is other than geeks.


This is a significant weakness. It is important for non-technical roles, i.e. business analyst, project manager, etc, to have a strong grasp of information technologies and tools.
[ November 18, 2008: Message edited by: James Clark ]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8713
    
    6

Originally posted by James Clark:
It is important for non-technical roles, i.e. business analyst, project manager, etc,


I have the opposite opinion. If those roles aren't occupied by technical people, I don't want them making technology decisions for me. That's asking for a Dilbert-esque meeting where somebody's read about this great new thing called AJAX on a blog and demands that all our databases use it. Then I have to :roll: and and and finally implement it my own way because non-technical people won't know the difference
And for what it's worth, Python is my choice if a task is too much for a shell script but not enough for a full-blown Java app. My employer has several large-scale Python apps in production and from what I've heard, there haven't been any language-related drawbacks or limitations.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Joe, I see your point. I wasn't speaking on "making decisions" however, just for clarity.

What I have experienced is that when non-technical management and other roles do have a significant understanding of information technologies and the various needs of them, better decisions are made and things run smoother.

A project manager that has a significant understanding of Java-based development is a great thing, in my opinion.

A project manager that is clueless about the differences between Java statements and SQL statements, or a web server and an application server, is not a great thing, in my opinion.
 
Consider Paul's rocket mass heater.
 
subject: Perl Vs Python/Ruby
 
Similar Threads
Comparing (and contrasting) some of the languages mentioned...
Can Ruby replace perl script?
why python ?
A few Ruby questions
What about perl?