Recent posts tagged shellcheck

Fabien B. • 1 day • in Discussions • 2 min read forumDiscussion group7 participants post-cover-36357
  • ai
  • llm
  • architecture
  • discuss
BashSnippets • 4 days • in Articles • 1 min read
Five lines whose only job is to refuse a deploy when the token is missing. Run with the token unset: $ cat deploy-guard.sh !/bin/bash if -n $DEPLOYTOKEN ; then echo "token present, deploying" else echo "no token, refusing" >&2; exit 1 fi $ env ...
post-cover-33582
  • bash
  • linux
  • devops
  • shellcheck
BashSnippets • Nov 19 • in Articles • 1 min read
rm -rf "$TARGET/" looks correct. The quotes are right and the glob sits outside them, where it has to. I put it in a two-line script in a scratch directory and asked what happens when TARGET is empty, with echo in front so rm never ran: the command l...
post-cover-29100
  • bash
  • linux
  • shellcheck
  • devops
BashSnippets • Sep 29 • in Articles • 1 min read
SC2086 sits at info, ShellCheck's lowest default severity, and fires on every unquoted $var, so it is usually the first rule anyone disables. I built the smallest test I could: a directory holding quarterly, report.txt and quarterly report.txt, and a...
post-cover-28019
  • bash
  • linux
  • shellcheck
  • devops
To see more, click for the full list of posts or popular tags.
chevron_left
🔥 4 posts • 👩‍💻 1 active writers

✨ Want to write in this topic?
Share your learning. Get discovered. Build your profile.
Join CoderLegion

💡 Why developers use CoderLegion
Track learning • Share posts • Get ranked publicly
Create your profile