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.

Bash Pitfalls

106 pointsby pujjadover 3 years ago

9 comments

dangover 3 years ago
Related:<p><i>Bash Pitfalls</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24401085" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24401085</a> - Sept 2020 (111 comments)<p><i>Bash Pitfalls</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10068567" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10068567</a> - Aug 2015 (38 comments)<p><i>Bash Pitfalls</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6790169" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6790169</a> - Nov 2013 (54 comments)<p><i>Common Bash Pitfalls</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=869560" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=869560</a> - Oct 2009 (25 comments)<p><i>Bash Pitfalls</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=52700" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=52700</a> - Sept 2007 (1 comment)
评论 #30361803 未加载
HenrikBover 3 years ago
(Disclaimer: I&#x27;m the co-developer)<p>Together with GitHub user xPMo, I created a Shellcheck REPL tool (<a href="https:&#x2F;&#x2F;github.com&#x2F;HenrikBengtsson&#x2F;shellcheck-repl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;HenrikBengtsson&#x2F;shellcheck-repl</a>) that validates your Bash commands using ShellCheck _before_ they are evaluated. For example,<p>$ words=&quot;lorem ipsum dolor&quot; $ echo $words ^-- SC2086: Double quote to prevent globbing and word splitting.<p>It was a toy project at first, but since I&#x27;ve learned so much about Bash from using it, I now have it enabled all the time.
评论 #30428823 未加载
评论 #30364648 未加载
评论 #30381878 未加载
asicspover 3 years ago
See also:<p>* <a href="https:&#x2F;&#x2F;www.shellcheck.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.shellcheck.net&#x2F;</a> — linting tool to avoid common mistakes and improve your script<p>* Bash Practices: <a href="https:&#x2F;&#x2F;mywiki.wooledge.org&#x2F;BashGuide&#x2F;Practices" rel="nofollow">https:&#x2F;&#x2F;mywiki.wooledge.org&#x2F;BashGuide&#x2F;Practices</a><p>* Bash FAQ: <a href="https:&#x2F;&#x2F;mywiki.wooledge.org&#x2F;BashFAQ" rel="nofollow">https:&#x2F;&#x2F;mywiki.wooledge.org&#x2F;BashFAQ</a><p>* safe ways to do things in bash: <a href="https:&#x2F;&#x2F;github.com&#x2F;anordal&#x2F;shellharden&#x2F;blob&#x2F;master&#x2F;how_to_do_things_safely_in_bash.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;anordal&#x2F;shellharden&#x2F;blob&#x2F;master&#x2F;how_to_do...</a><p>* better scripting: <a href="https:&#x2F;&#x2F;robertmuth.blogspot.in&#x2F;2012&#x2F;08&#x2F;better-bash-scripting-in-15-minutes.html" rel="nofollow">https:&#x2F;&#x2F;robertmuth.blogspot.in&#x2F;2012&#x2F;08&#x2F;better-bash-scripting...</a><p>* robust scripting: <a href="https:&#x2F;&#x2F;www.davidpashley.com&#x2F;articles&#x2F;writing-robust-shell-scripts&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.davidpashley.com&#x2F;articles&#x2F;writing-robust-shell-s...</a>
unfocussed_mikeover 3 years ago
The title of this article brings to mind an imaginary platform game with controls so complex you have to have three browser tabs of instructions open to play it.<p>I am hopeful that the page will have a screenshot, when I am able to access it.
rr808over 3 years ago
bash is a pitfall. In this world of IAC, powerful tools, unit testing, CICD, well crafted languages and libraries its a relic of an old time long gone.
评论 #30364245 未加载
评论 #30363042 未加载
评论 #30362880 未加载
chompover 3 years ago
Can’t load the link, but I’m intimately familiar with Greg’s wiki. It’s been around for ages and a very great resource for Bash arcana.
243423443over 3 years ago
<a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20220215122427&#x2F;mywiki.wooledge.org&#x2F;BashPitfalls" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20220215122427&#x2F;mywiki.wooledge.o...</a>
joshbaptisteover 3 years ago
This and <a href="https:&#x2F;&#x2F;wiki.bash-hackers.org" rel="nofollow">https:&#x2F;&#x2F;wiki.bash-hackers.org</a>, #bash on irc (libera now) helped me tremendously on writing hardened scripts in production.
评论 #30361735 未加载
simula67over 3 years ago
HN hug of death? Mirror: <a href="https:&#x2F;&#x2F;archive.is&#x2F;Vz4M5" rel="nofollow">https:&#x2F;&#x2F;archive.is&#x2F;Vz4M5</a>