Telling a Computer to Do Things

Learning shell scripting unlocks powerful automation without heavy tooling.

12 cards · 1m 30s · tap to begin

From · · 1m 30s

Telling a Computer to Do Things

Learning shell scripting unlocks powerful automation without heavy tooling.

In brief

Learning shell scripting unlocks powerful automation without heavy tooling. Shell scripts are 20% syntax and 80% knowing the right tools to stitch together. Originally reported by will keleher.

Quick answers

Why Shell Scripts?
Shell scripts are easier for simple command chaining but become complex for sophisticated logic.
Why Not Shell?
For complex logic, higher-level languages like JavaScript offer better data handling and testing.
What is the key takeaway from Telling a Computer to Do Things?
Shell scripts are 20% syntax and 80% knowing the right tools to stitch together.

Early Shell Struggles

For years, the author could only run simple terminal commands one at a time without logic or automation.

Basic Script Logic

The author wrote a simple script checking npm install success with exit codes and error messages.

Shell vs. NodeJS

A shell script runs tests until failure with minimal syntax, while NodeJS requires more complex error handling.

Tool Ecosystem

Tools like fzf, tldr, and rsync let engineers automate tasks without writing complex scripts.

Why Shell Scripts?

Shell scripts are easier for simple command chaining but become complex for sophisticated logic.

Tool Knowledge Matters

Knowing the right tools like xargs or sed -i makes shell scripts more powerful and maintainable.

Simplified Script

The author later simplified a script using direct command checks instead of complex error handling.

Shell Expertise

The author emphasizes that shell mastery is 80% tool knowledge, not syntax.

Tool Recommendations

Tools like zx help JavaScript teams write maintainable scripts without shell complexity.

Why Not Shell?

For complex logic, higher-level languages like JavaScript offer better data handling and testing.

Key Insight

The author argues that shell scripts are 20% syntax and 80% knowing the right tools to stitch together.

Real-World Impact

Engineers who skip shell scripting struggle with automation, leading to inefficient workflows.

What it means

Shell scripts are 20% syntax and 80% knowing the right tools to stitch together.

Read the original on will keleher

React

Sign in to react and comment.

Comments (0)

Life is short. Keep it sweet. Respect others' opinions and be kind!

    Recommended next

    More decks on shell and related topics.