LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-24-2012, 01:52 PM   #1
elalexluna83
Member
 
Registered: Mar 2012
Posts: 55

Rep: Reputation: Disabled
Learn Python or Perl for SysAdmin


Hi all, i'm thinking go further with scripting within unix/linux administration and i want to learn a new language. What book do you think it can be best (learning curve, efficiency, quick)

* Python for Unix and Linux System Administration
* Automating System Administration with Perl: Tools to Make You More Efficient

http://www.amazon.com/Automating-Sys...administration

http://www.amazon.com/Python-Unix-Li...administration

NOTE: NOtice that i have no previous experience neither perl nor python.
 
Old 10-24-2012, 02:33 PM   #2
Fred-1.2.13
Member
 
Registered: Jan 2006
Location: Midwest USA
Distribution: Started with Slackware - 3.0 1995 Kernel 1.2.13 - Now Slackware Current. Also some FreeBSD.
Posts: 124

Rep: Reputation: 59
I would start learning Bash, Awk and Sed for a good overview in scripting and then move on to Python. You should be very comfortable with Bash shell scripting as it is what you will use most often doing system admin.

You will get up and going with Python much faster than Perl and Python is a very popular language used in many Linux apps.

Your Python book choice should be a good one. Here are some other suggestions:

Get this book if nothing else:
Bash:
http://www.amazon.com/Learning-bash-...&keywords=bash

AWK:
http://www.amazon.com/Effective-awk-...3&keywords=awk

Sed and AWK:
http://www.amazon.com/sed-awk-2nd-Da...1&keywords=awk
 
Old 10-24-2012, 06:18 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
And I would recommend equally that you learn both. And PHP while you're at it. (I'm quite serious.) You're probably going to find all three of these already-installed on every system you meet on the street.

Yes, I'm saying learn several. Also, carefully observe the techniques that are used in both of the books you named. Notice not only how they're applying their language-de-jour to the problem, but especially notice what problems they are applying them to!

In each case, one of the key benefits of these languages is the rather-vast amount of existing, debugged software that you can install, if it isn't already installed, on your machine. For example, if you'd like to have a full web-server, you can create one with literally one line of Perl code (which of course loads-and-runs a program object that's implemented in several thousand lines by somebody else!). This is the kind of "programming power-tool" ability that's really the bread-and-butter skill of any and every sysadmin.

Even though you should as a matter of course be familiar with tools like bash-scripting and sed, largely because you will encounter them, the Linux environment is frankly stuffed with excellent, full-featured language implementations ... all free. These are your stock-in-trade. You can write "a command" in any of them, thanks to the magic of #!shebang, and these are all tools that are specifically designed to be used for creating programs, big or small as the case may be. (Only the rarely-used Korn shell has a built-in "true programming" language that's intended to be so.)

P.S.: cat any_language_bashing > /dev/null, please.

Last edited by sundialsvcs; 10-24-2012 at 06:19 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Perl vs Python which is easier to learn ajeesh.tr Programming 35 01-25-2011 06:11 PM
Python related: How to access a Perl script behind a firewall from Python? vxc69 Programming 8 12-14-2010 07:32 AM
What to learn?.. HuMmMm.. Python? Perl? jhyland87 Programming 20 03-04-2010 02:11 PM
Documents to learn C language and Perl/python satimis Programming 5 03-19-2004 10:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration