开发者

Python and/or Perl VS bash [closed]

Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

开发者_如何学编程

Closed 9 years ago.

Improve this question

I normally code admin scripts in Python and I know of many that code them in Perl. I was about to invest some time on improving my skills on bash programming. But I wonder if people around think that this is a good idea ?

I know bash is a good skill to have and market very often demand it but ... if I can get by with Python or Perl then ... is it really worth the effort ?

As answers I am looking for cases where actually bash is way better than Perl or Python to develop admin scripts.


Anything you learn can only benefit you, never is it a bad idea to learn something. That said, if you feel you're productive with Python then I don't see why you would need bash. Python is more powerful (being a full blown programming language) and IMO has a nicer, more readable syntax. Bash is often useful for quick and dirty scripting, though.

If you do decide to learn it, here are some resources to get you started:

  1. A Bash guide for beginners
  2. The magnificent Bash FAQ
  3. Common Bash Pitfalls

Although some rules-of-thumb are occasionally thrown in the air regarding when you should use each, I think you'll figure it out once you get to know all of your options. Having another tool in your arsenal is always an advantage.


I'd say if this is only your machine and you're not supposed to share those administration scripts with any other one, so you'd better to keep doing that in Python (which seems you feel more comfortable on that).

But if you have colleagues or your admin scripts are supposed to employee by other people, so let keep it in a way that is more popular and more understandable for others also: Bash!

Also I guess if you know Bash, you can simply use dozens of existing Bash scripts by customizing them or improving them to whatever which is more suitable for you!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜