Table of Contents
回复内容:
Home Backend Development PHP Tutorial Perl、PHP、Python、Ruby对于入门的Linux运维来说,哪个更易学?

Perl、PHP、Python、Ruby对于入门的Linux运维来说,哪个更易学?

Jun 17, 2016 am 08:32 AM
linux

基础较差,刚刚入门Linux运维,希望可以学习一个用于Linux运维

回复内容:

perl太古老,写好的代码看起来费劲,现在基本停止进化了,虽然6搞了很多年了,还不知道什么时候能出来,php很呆板不适合做运维,最后就在 python和ruby这两个来抉择,很明显支持python的人会居多,主要可能是因为python的先发优势,但ruby有一个优势:一行代码解决问题的能力(这一点继承了perl),当年刚学perl非常惊讶于他的这样 perl -ne 'chomp; print;' file 简洁的连变量都不用写(多年过去只记得这一句了),ruby很好的继承了这一点 ruby -ne 'print $_.chomp' file ,还有比如吸收了awk的BEGIN/END,可以完全替代awk、sed、grep等命令,这里有些例子:Ruby one-liners,python因为必须缩进,在一行代码解决问题的能力上面明显不敌ruby,所以推荐Ruby。 Ruby,你可以参考我写的这本书:Chef之道 - GitBook 运维方向的常用语言目前主要是三种:Shell Scripts,Perl,Python。抛开shell不谈(无论你最后选哪个,shell都是绕不过的,哪怕不精通至少也要熟练)。而在Perl与Python当中,目前的选择当然是Python第一,除非你有很多Perl的历史遗留需要维护。PHP与Ruby更多的是用在WEB端的开发中,在运维体系中用的不多。

Perl 与 Python 相对 PHP 与 Ruby 的优势主要集中在现有发行版的Linux基本都自带,有极其丰富的针对运维的第三方库,有大量的实际经验可以借鉴。

而Python相对于Perl的优势在于,简单,易学,可读性好,写代码的效率高,Code review与团队间合作愉快

Python的运行效率有所薄弱,但在运维场景中,高的开发效率远比稍慢的运行效率更重要。 ruby。语法优雅 ,一致,上手比较容易,而且题主所说的linux运维方面对执行效率要求不是很高。
个人觉得python语法没有ruby优雅,上手比ruby难一点。
python开源库多,然而在这方面并没有什么卵用。 ruby和python都可以 Perl,谁用谁知道,就比比 one line 好了,其他那几个能战么( 个人经验
ruby语法简练优雅,但约定大于配置的“自由”思想需要学习者认同适应;
python数据结构处理方便,语法精炼,了解配置就好;
php接触不多,感觉编程思想有些混杂;
perl根本没兴趣去接触… 不会php, 就说剩下三个, 学习难度: python >> ruby > perl
对运维来说的实用程度: perl >> ruby/python 要知道很多金融行业的大牌公司, 都是一边骂perl难用一边打着灯笼招人来维护他们的遗留perl脚本的.

不过这又有啥关系呢? 我知道ruby一堆缺点, 但是我还是会选ruby, 这几个里面也只有ruby的设计正常一些了... 我用php做运维,也没啥不行的。php+shell各种cli,各种daemon。唯一不好的是没什么开源的软件用。另外b格跟不上py的。 要想精通都很难。
我觉得可以根据你最急的需求,选一个相对合适的语言入手,并逐步把他吃透,搞懂。然后根据一些文档或者书籍《xx天精通xx》,真正了解语言特性。
等你真的精通一门语言的时候,再去用别的语言做一些简单的工作,就可以看看《快速入门xxx》就可以干活了。


因为本质上说,很多编程语言的基础和常见特性是可以互通的,缺失的仅仅是他们的特性而已。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve permission issues when using python --version command in Linux terminal? How to solve permission issues when using python --version command in Linux terminal? Apr 02, 2025 am 06:36 AM

Using python in Linux terminal...

Four ways to implement multithreading in C language Four ways to implement multithreading in C language Apr 03, 2025 pm 03:00 PM

Multithreading in the language can greatly improve program efficiency. There are four main ways to implement multithreading in C language: Create independent processes: Create multiple independently running processes, each process has its own memory space. Pseudo-multithreading: Create multiple execution streams in a process that share the same memory space and execute alternately. Multi-threaded library: Use multi-threaded libraries such as pthreads to create and manage threads, providing rich thread operation functions. Coroutine: A lightweight multi-threaded implementation that divides tasks into small subtasks and executes them in turn.

How to open web.xml How to open web.xml Apr 03, 2025 am 06:51 AM

To open a web.xml file, you can use the following methods: Use a text editor (such as Notepad or TextEdit) to edit commands using an integrated development environment (such as Eclipse or NetBeans) (Windows: notepad web.xml; Mac/Linux: open -a TextEdit web.xml)

Can the Python interpreter be deleted in Linux system? Can the Python interpreter be deleted in Linux system? Apr 02, 2025 am 07:00 AM

Regarding the problem of removing the Python interpreter that comes with Linux systems, many Linux distributions will preinstall the Python interpreter when installed, and it does not use the package manager...

What is the Linux best used for? What is the Linux best used for? Apr 03, 2025 am 12:11 AM

Linux is best used as server management, embedded systems and desktop environments. 1) In server management, Linux is used to host websites, databases, and applications, providing stability and reliability. 2) In embedded systems, Linux is widely used in smart home and automotive electronic systems because of its flexibility and stability. 3) In the desktop environment, Linux provides rich applications and efficient performance.

How is Debian Hadoop compatibility How is Debian Hadoop compatibility Apr 02, 2025 am 08:42 AM

DebianLinux is known for its stability and security and is widely used in server, development and desktop environments. While there is currently a lack of official instructions on direct compatibility with Debian and Hadoop, this article will guide you on how to deploy Hadoop on your Debian system. Debian system requirements: Before starting Hadoop configuration, please make sure that your Debian system meets the minimum operating requirements of Hadoop, which includes installing the necessary Java Runtime Environment (JRE) and Hadoop packages. Hadoop deployment steps: Download and unzip Hadoop: Download the Hadoop version you need from the official ApacheHadoop website and solve it

Do I need to install an Oracle client when connecting to an Oracle database using Go? Do I need to install an Oracle client when connecting to an Oracle database using Go? Apr 02, 2025 pm 03:48 PM

Do I need to install an Oracle client when connecting to an Oracle database using Go? When developing in Go, connecting to Oracle databases is a common requirement...

Is Debian Strings compatible with multiple browsers Is Debian Strings compatible with multiple browsers Apr 02, 2025 am 08:30 AM

"DebianStrings" is not a standard term, and its specific meaning is still unclear. This article cannot directly comment on its browser compatibility. However, if "DebianStrings" refers to a web application running on a Debian system, its browser compatibility depends on the technical architecture of the application itself. Most modern web applications are committed to cross-browser compatibility. This relies on following web standards and using well-compatible front-end technologies (such as HTML, CSS, JavaScript) and back-end technologies (such as PHP, Python, Node.js, etc.). To ensure that the application is compatible with multiple browsers, developers often need to conduct cross-browser testing and use responsiveness

See all articles