Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are many Linux/Unix shells (bash, tcsh/csh, ksh, zsh...), but bash has become the most popular, probably because it is the default shell in open-source Linux.

...

  • a command-line interpreter (a.k.a. Read-Eval-Print loop, or REPL)
  • a rich set of built-in commands for file system navigation & data manipulation
  • advanced utility programs (e.g. cut, join, paste, sort, grep, sed, awk, perl)
    • some of which are full-featured programming languages of their own (awk, perl)
  • many programming language features
    • variables, variable types, control structures, functions
  • a lot of weird but powerful syntax (piping, redirection)
  • a highly extensible execution environment
    • enables calling of both built-in and custom scripts & programs

...

  • a lot of weird (but powerful) syntax ( (smile) )
  • a meager set of built-in data types
  • functions and scripts can only return one small integer value
    • the proxy for this is capturing output, but this can be tricky
  • no support for object oriented programming

...

The combination of piping, a large set of built-in utilities, and the ease of creating and troubleshooting long "command line one-liners" provides tremendous productivity potential over, for example, having to write a Python program to achieve equivalent results.

This Piping a Histogram discussion provides a good example Cut, sort, uniq and piping a histogram discussion in the Intermediate Unix course provides some good examples.

For scripting

Because bash is an execution environment, it is uniquely well suited for executing a series of processing steps, often calling other programs or utilities, and integrating the results. Such scripts are sometimes termed pipeline scripts and can automate processes that consist of many sub tasks – for example, next-gen sequencing alignment pipeline scripts that go from raw reads (FASTQ files) to alignment reports (sorted, index BAM files), gathering statistics along the way.

...

These days, complex pipelines may be difficult to write in any single programming language; thus workflow managers are becoming increasingly popular. These tools allow the integrated orchestration of many different workflow components, potentially written in many different languages, managing their dependencies via rules (think make, on steroids), and can also be effectively deployed in cloud environments such as AWS and Google Cloud. Both Nextflow and Snakemake, two of the most popular workflow managers, support rule bodies written in bash as well as other languages.

...

From a the 2020 Stack Overflow programming languages poll (https://insights.stackoverflow.com/survey/2020)

Most "loved"
programming languages
Most popular (and in demand)
programming languages

Image Modified

Image Modified

Developer pay by programming language

Image Modified