TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Advanced Bash-Scripting Guide

42 pointsby ekiauhce11 months ago

6 comments

mmh000011 months ago
There are many foot-guns to be found in bash scripting.<p>I highly recommend the Wooledge wiki for any and all bash knowledge, it points every place you can go wrong, especially when using advanced features.<p><a href="https:&#x2F;&#x2F;mywiki.wooledge.org&#x2F;FullBashGuide" rel="nofollow">https:&#x2F;&#x2F;mywiki.wooledge.org&#x2F;FullBashGuide</a><p><a href="http:&#x2F;&#x2F;mywiki.wooledge.org&#x2F;BashFAQ" rel="nofollow">http:&#x2F;&#x2F;mywiki.wooledge.org&#x2F;BashFAQ</a>
评论 #40820995 未加载
freedomben11 months ago
Really great resource. If you want more of a book format, I also highly recommend The Linux Command Line by William Shotts: <a href="https:&#x2F;&#x2F;linuxcommand.org&#x2F;tlcl.php" rel="nofollow">https:&#x2F;&#x2F;linuxcommand.org&#x2F;tlcl.php</a>
TacticalCoder11 months ago
Mandatory comment every time the subject comes up: <i>shellcheck</i> is really helpful when writing Bash scripts.<p>shellcheck itself is not written in Bash (it&#x27;s written in Haskell) but it gives really good hints and find lots of bugs. If you disagree with some of its warnings, you can choose which ones you want to turn off.<p>I use it from within Emacs and it works fine. Set that thing once, years ago, and it&#x27;s been helping me ever since.<p>Also: shellcheck probably ships with your Linux distro.
systems11 months ago
last update 2014<p>that being said, it think 10 years later, linux should pick a data oriented shell (powershell or nushell) and go full in on it<p>on windows, almost all services have some Powershell support<p>i understand that on linux, command line support is always there, so unlike windows adding command line support is not really news, but still i think the move to a data oriented shell, is better
评论 #40821037 未加载
Grimeton11 months ago
There are so many things that can go wrong when scripting in the shell. If you don&#x27;t sit down and play with it, trying to understand what&#x27;s going on, then no guide will save you.<p><pre><code> : &quot;${foo:=bar}&quot;</code></pre>
KolenCh11 months ago
I used to read this cover to cover when I first learnt bash. But I later found that its advice can be subpar from time to time. There are better resources in learning bash.
评论 #40835775 未加载