Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 3
    "Shell scripts have little built-in ability to do parallel execution." In my opinion the shell has better support for parallel processing than most other languages. With a single character & you can run processes in parallel. You can wait for the child processes to complete. You can set up pipelines, and more complex networks of pipes using named pipes. Most importantly, it is simple to do parallel processing the right way, with very little boilerplate code and avoiding the risks and difficulties of shared-memory multi-threading. Commented Dec 17, 2016 at 4:20
  • @SamWatkins: I've updated point 5 above to address your reply. While I, too, am a fan of message-passing between separate processes as a way to avoid many of the problems inherent in shared-memory parallelism, the point I was making here is about increasing performance, not about composability and such, and that often requires shared-memory parallelism. Commented Jun 9, 2017 at 19:19
  • Shell scripts are good for prototyping - but eventually a project should move to a proper programming language, then ideally a compiled language. Then in extreme cases assembly, like you would see with the FFmpeg project. Cmake is a good example of what should happen to Autotools - its written in C and doesnt require Perl or Texinfo or M4. Its kind of embarassing really that Autotools still relies so heavily on shell scripts after 30 years wikipedia.org/wiki/GNU_Build_System#Criticism Commented Feb 14, 2018 at 0:07
  • Since the OP asked about how complex Bash scripts can get, I thought it would be useful to add this example of Bashtop (htop but written in Bash :D ) github.com/aristocratos/bashtop I was really surprised at its complexity, things that I had no idea could be accomplished in Bash. Commented May 1, 2020 at 6:47