Common shell script mistakes (2008)

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • ngs

    Next Generation Shell (NGS)

  • Welcome to (shameless plug) Next Generation Shell. It's a modern programming language for DevOps. It is both concise for running external programs (uses small subset of bash syntax) and it is a "real" programming language with data structures and sane error handling among other things.

    Compared to general purpose programming languages, it was built for "DevOps"y use cases in mind. See https://github.com/ngs-lang/ngs/wiki/Use-Cases

    Ability to run external programs is high on the priorities list. In NGS it means having its own short syntax and handling exit codes among other things. NGS throws exceptions on "bad" exit codes. Hint: not for all tools non zero exit code is "bad". Did not see equivalent exit code handling anywhere else.

    Compared to bash... It's not fair comparison even. Another era, another reality, other expectations. Small example: When APIs return structured data, well... you better be able to handle it. See https://ilya-sher.org/2018/09/10/jq-is-a-symptom/

    Compared to other modern shells, I would say, NGS is programming language first as opposed to shell first.

  • ShellCheck

    ShellCheck, a static analysis tool for shell scripts

  • This advice is largely automated by https://github.com/koalaman/shellcheck

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • bash-language-server

    A language server for Bash

  • As well, having a bash language server enabled (https://github.com/bash-lsp/bash-language-server) helps immensely.

  • oil

    Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!

  • Shell script is a kind of DSL for the OS operations and PHP a kind of DSL for the web programming. Similarly, it does not make sense to advocate the usage of R for web programming but people do it anyway.

    Shell script have their deficiencies but it's the best for their intended environment. Alternatively now there's Oil shell that looks promising for modern approach to shell programming [1]. Expect to see exponential usages of shell programming now that we have new popular OS related technology including containers, isolates, and functional package management like Nix and Guix.

    [1]https://www.oilshell.org/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Ask HN: A Bash guide for Posix programmers?

    1 project | news.ycombinator.com | 17 Dec 2023
  • Download Toddler for FREE: Toddler is a bash script that extracts all the TODO comments across your codebase into a markdown file.

    1 project | /r/ToddlerAI | 11 Dec 2023
  • Download Toddler for FREE: Toddler is a bash script that extracts all the TODO comments across your codebase into a markdown file.

    1 project | /r/ToddlerAI | 8 Dec 2023
  • Download Toddler for FREE: Toddler is a bash script that extracts all the TODO comments across your codebase into a markdown file.

    1 project | /r/ToddlerAI | 6 Dec 2023
  • Download Toddler for FREE: Toddler is a bash script that extracts all the TODO comments across your codebase into a markdown file.

    1 project | /r/ToddlerAI | 5 Dec 2023