Tagged articles
10 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Sep 18, 2024 · Operations

Boost Your Shell Scripts: Master ShellCheck for Error‑Free Bash Coding

ShellCheck is a popular open‑source static analysis tool that scans Bash, sh, ksh, and dash scripts, highlighting syntax mistakes, unsafe commands, and logic flaws, while offering detailed explanations and fixes, and can be run via CLI, editors, CI pipelines, or Docker.

BashShellCheckstatic analysis
0 likes · 8 min read
Boost Your Shell Scripts: Master ShellCheck for Error‑Free Bash Coding
Liangxu Linux
Liangxu Linux
Jun 29, 2021 · Fundamentals

Why Bash Returns Zero When Summing a Column and How to Fix It

This article explains why a simple Bash loop may output zero when trying to sum the second column of a text file, demonstrates three different line‑by‑line approaches, shows common pitfalls such as pipeline subshells and whitespace handling, and provides correct solutions with shellcheck recommendations.

BashShell scriptingShellCheck
0 likes · 6 min read
Why Bash Returns Zero When Summing a Column and How to Fix It
Liangxu Linux
Liangxu Linux
Oct 20, 2020 · Fundamentals

Essential Shell Script Style Guide: Best Practices and Tips

This guide consolidates practical conventions for writing clean, maintainable shell scripts, covering shebang usage, commenting, parameter validation, variable handling, indentation, naming, encoding, efficiency tricks, and static analysis with ShellCheck.

BashShell scriptingShellCheck
0 likes · 19 min read
Essential Shell Script Style Guide: Best Practices and Tips
Efficient Ops
Efficient Ops
Apr 14, 2020 · Operations

Master Shell Script Best Practices: Clean Code, Safety, and Efficiency

This guide consolidates essential shell scripting conventions—including shebang usage, comprehensive commenting, parameter validation, variable handling, indentation, naming, encoding, permission settings, logging, password safety, line continuation, code brevity, quoting, main‑function patterns, scope control, indirect references, heredocs, path resolution, parallel execution, and static analysis with ShellCheck—to help developers write readable, maintainable, and performant scripts.

BashShell scriptingShellCheck
0 likes · 22 min read
Master Shell Script Best Practices: Clean Code, Safety, and Efficiency
21CTO
21CTO
Jun 14, 2019 · Operations

Essential Shell Script Coding Standards for Clean, Efficient Automation

This guide consolidates best‑practice conventions for writing readable, maintainable, and efficient shell scripts, covering shebang usage, commenting, parameter validation, variable naming, indentation, quoting, function structuring, scope handling, heredocs, path resolution, performance tricks, parallel execution, and static analysis with ShellCheck.

Shell scriptingShellCheckautomation
0 likes · 16 min read
Essential Shell Script Coding Standards for Clean, Efficient Automation
ITPUB
ITPUB
Sep 13, 2018 · Fundamentals

8 Essential Shell Script Best Practices Every Developer Should Follow

This guide presents eight practical recommendations for writing robust Bash scripts, covering shebang selection, debugging flags, static analysis with ShellCheck, variable expansion, proper use of local, signal trapping, thoughtful coding habits, and choosing the right tool for the job.

BashDebuggingShell scripting
0 likes · 10 min read
8 Essential Shell Script Best Practices Every Developer Should Follow
ITPUB
ITPUB
Aug 9, 2017 · Backend Development

8 Essential Shell Scripting Practices Every Developer Should Follow

This article shares eight hard‑earned recommendations for writing robust Bash scripts, covering shebang selection, debugging flags, static analysis, variable expansion, proper scoping, signal trapping, defensive coding, and knowing when to switch to a more suitable language.

BashDebuggingError Handling
0 likes · 10 min read
8 Essential Shell Scripting Practices Every Developer Should Follow
MaGe Linux Operations
MaGe Linux Operations
Apr 15, 2017 · Fundamentals

Master Bash Scripting: Essential Basics, Quirks, and Safety Tips

This article walks through Bash scripting fundamentals—including variable assignment, quoting, loops, conditionals, functions, return codes, and background jobs—while highlighting common pitfalls and safety practices such as always quoting variables and using the shellcheck linter.

BashIf StatementsSafety
0 likes · 10 min read
Master Bash Scripting: Essential Basics, Quirks, and Safety Tips