Is there any use for Bash scripting anymore?


I just finished my second year as a university CS student, so my "real-world" knowledge is lacking. I learned Java my first year, continued with Java and picked up C and simple Bash scripting my second. This summer I'm trying to learn Perl (God help me). I've dabbled with Python a bit in the past.

My question is, now that we have very readable, very writable scripting languages like Python, Ruby, Perl, etc, why does anyone write Bash scripts? Is there something I'm missing? I know my linux box has perl and python. Are they not ubiquitous enough? Is there really something that's easier to do in Bash than in some other hll?

6/29/2010 7:03:37 PM

Accepted Answer

Among other things, bash is useful when most of what you're doing is communicating and piping between various programs (many of which are also standard). And there are many environments where bash (or at least a POSIX shell) is available but Perl and Python are not.

And of course, you should distinguish between interactive bash and scripted bash. Ubuntu recently switched their default scripted shell (#!/bin/sh) to dash because it was much faster. However, bash has useful interactive features dash does not (zsh is still better, IMHO).

5/20/2019 3:44:17 PM

Bash is incredibly useful in system administration, web application deployment, data crunching, sutomated backups, even getting-things-done day by day management just to name really few of them. I think It's too early for you to judge a "veteran IT soldier" like BASH.

EDIT googling around:

I'd like also to mention that TextMate a successful OS-X program has a lot of Bash machinery inside.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow