Re: [OT] Alternative, supplement to Perl for sysadministration?
by Jenda (Abbot) on Jan 06, 2009 at 23:52 UTC
|
Perl is mainly designed to let you do anything you need to do. Sysadmin tasks are one very common application of Perl and with the number and breadth of modules on CPAN I'd be surprised if learning Python gave you any more power.
The choice between Perl and Python is mainly a matter of personal taste. Some people find Perl more to their liking, some like Python more. Could you elaborate on that "hard way" you mentioned? Maybe you overlooked something and you'd have more luck asking about that problem, instead of about some other language to use.
| [reply] |
Re: [OT] Alternative, supplement to Perl for sysadministration?
by JavaFan (Canon) on Jan 07, 2009 at 00:18 UTC
|
After i learned the hard way that Perl is "mainly" designed to manipulate text (and fine for cgi) and as a "glue language" i wonder what else should i maybe learn ...
Yes....
"Python"? for sysadmin tasks in alternative or supplement to shell/bash/perl?
Wait. What do you mean "glue language" means? I've been doing sysadmin tasks for over 20 years. Sysadminning is
mostly glueing.
I don't know any language that's more suitable for sysadminning than Perl, and I don't think there's an area that's more suited for Perl than sysadminning.
I read some wikipedia articles
Wikipedia articles usually tell the opinions and beliefs of the last person editing it.
| [reply] |
|
|
Nice arguments. Thanks. The other point which i meant "hard way" was not so easy to complete for me (at the beginning) was to move some files around it felt a little (forgive me) like shooting myself into the knees, so i went back to bash where i knew how to do it. Meanwhile i learned i have to use cpan and function like File::Copy http://perldoc.perl.org/File/Copy.html TIMTOWTDI
is something a beginner has sometimes his difficulties with (like i had with Linux a few years back, which i never regretted to dig into) to see the trees ... I like Perl and its definitive worth it
| [reply] |
|
|
Odd that you mention File::Copy. As a sysadmin, I care about file permissions. 'cp' cares about them too. Hey, even POSIX cares about them enough to specify how 'cp' should behave with respect to file permissions.
File::Copy doesn't care about file permissions - the permissions it creates for a newly created file are independent of the original file. Hate! A copied executable should be executable, but File::Copy disagrees.
Therefore, I always use system 'cp', $source, $destination. Not to mention that system 'cp', @sources, $destination just works.
| [reply] |
Re: [OT] Alternative, supplement to Perl for sysadministration?
by jhourcle (Prior) on Jan 07, 2009 at 01:18 UTC
|
It really comes down to what you're trying to do in your sysadminly duties.
If there are specific tools that you use, that are written in Python, that you'd like to extend/modify/whatever, then sure, that's probably a good choice.
If you're just looking for a random language out there ... I'm not sure that there's a good one. I keep telling myself I'm going to learn how to understand make files, for when I have to deal with problems porting stuff, but I never have. And I've been meaning for the last decade to learn Expect for monitoring my systems, but I've never done that, either.
I guess part of my problem is that I see the learning languages as a solution to a problem ... I don't do well just trying to 'learn' a language -- I have to try to implement something in it. And I generally have to weigh out the advantages of learning the new language to implement it, or just doing it in a language I know well ... if I had more free time, maybe it'd affect my decision.
| [reply] |
Re: [OT] Alternative, supplement to Perl for sysadministration?
by Anonymous Monk on Jan 07, 2009 at 00:08 UTC
|
Define "System Administration" and the set of tasks involved.
I run Linux at home and the office, and "system administration" consists of managing repositories of data (files) gathered from locations, made available to users, backed up and periodically cleaned up.
I started out using shell scripts with standard Unix commands (grep/sed/awk) to move things around across network shares. However, trying to port these scripts to other Unix's (SUN) and Windows was painful because of inconsistencies in shells and command flags. Now I prefer to write perl scripts in place of shell scripts, because the logic is more flexible and portable.
But, those are 'my' system administration needs...what are yours? | [reply] |
Re: [OT] Alternative, supplement to Perl for sysadministration?
by Lawliet (Curate) on Jan 07, 2009 at 00:58 UTC
|
Perl is king. All else are lies. Freedom is slavery. War is pea--
Well, Python does not really have its own niche like Perl does. Although, if Python came along first the situation might be reversed.
However, there are several benefits to learning Python. For one, who doesn't like to program something new? Another language will teach you more things (unless you count PHP) and better you overall. Also, some programs only allow plugins to be written in Python and not Perl :(
And you didn't even know bears could type.
| [reply] |
Re: [OT] Alternative, supplement to Perl for sysadministration?
by eye (Chaplain) on Jan 07, 2009 at 08:10 UTC
|
There are those that like Python for SA tasks. See: Gift N, Jones J. Python for Unix and Linux System Administration. O'Reilly Media: Cambridge (MA); 2008. (ISBN 0596515820)
That said, I'll take Perl for my SA activities. | [reply] |
|
|
| [reply] |
Re: [OT] Alternative, supplement to Perl for sysadministration?
by whakka (Hermit) on Jan 07, 2009 at 16:37 UTC
|
Funny, I use Perl for none of the things you mention and have yet to find it lacking. I would suggest continue learning Perl and try to find mature libraries on CPAN for the things you wish Perl could do, you might be surprised. | [reply] |