WeSearch

A shell colon does nothing. Use it anyway

Filip Roséen· ·5 min read · 0 reactions · 0 comments · 3 views
#shell#unix#posix#scripting#bash#Filip Roséen#Bash#Thompson shell#Unix#POSIX
TL;DR · WeSearch summary

The article explains the purpose and uses of the shell colon, a built‑in null command that performs no action but evaluates its arguments. It demonstrates how the colon can be combined with parameter expansion for argument validation, default assignment, and file redirection tricks. Historical context and frequently asked questions are also included.

Key facts
How this story was covered

2 outlets in our directory ran this story, first to last over 33 hours. All of the coverage we found sits in one bucket: centre. That one-sidedness is itself worth noticing.

Centre · 1
About this source

Lobsters files mainly under programming. We currently carry 187 of its stories.

Original article
Refp · Filip Roséen
Read full at Refp →
Story provenance
Source · retrieval · rights · ranking — open for full record
inspect →

Attribution is not the same as permission. This drawer separates discovery metadata, excerpts, WeSearch-generated summaries, reuse status, and whether the publisher receives the visit. Nothing here claims a legal grant the publisher has not made.

Record

Original publisherRefp
Canonical URLhttps://refp.se/articles/your-shell-and-the-magic-colon
Publication timeSat, 25 Jul 2026 06:33:00 -0500
Retrieval time2026-07-27T05:52:33.481Z
Last seen2026-07-27T05:52:33.481Z
Headline sourcePublisher (no WeSearch rewrite)
Excerpt sourcepublisher body
Excerpt methodFirst ~120 words (~800 chars) of extracted publisher body, fair-use limited.
SummaryWeSearch · cerebras-chat (WeSearch summarizer)
Summary source textcontentText
Citation coverageSummary is a WeSearch-generated derivative; primary citation is the original publisher URL.
ClusterCbscwuBBSita · 3 stories
Cluster logicGrouped by semantic title/content similarity across sources within a rolling window. Same-publisher template collisions are excluded from coverage comparison.
Ranking reasonStory pages are not engagement-ranked. Hub feeds use recency, with optional source-diversified chronological ordering (cap consecutive stories per source). No personalized ranking.
Publisher visitYes — open original
Substitutes article?No — link-out required for full text

Rights status (four layers)

Publisher-declared
No publisher-confirmed rights record for this source yet.
Machine-readable
No source-specific machine-readable restriction detected beyond the public feed.
WeSearch interpretation
WeSearch declared handling (basis: Derived from the published RSS/Atom feed). This is WeSearch policy, not a legal grant on the publisher's behalf.
Unknown
Retrieval and training permissions are not asserted unless the publisher confirms them.

WeSearch handling by dimension

Indexing May the item be indexed (stored, ranked, made findable)? Allowed
Snippet May a short excerpt of the publisher's text be shown? Allowed
AI summary May WeSearch generate its own short summary of the article? Limited
Retrieval / RAG May the content be exposed for third-party retrieval-augmented generation? Not asserted
Model training May the content be used to train AI models? Not asserted
Commercial reuse May the content be reused commercially? Not permitted

Basis: Derived from the published RSS/Atom feed. Contact: [email protected]. Reviewed: 2026-07-24.

Opening excerpt (first ~120 words) tap to expand

A shell colon does nothing. Use it anyway.I've written more shell scripts than I can count, but I still stumble upon tricks that honestly blow my mind far too often than I care to admit. Latest thing that blew my head clean off? The shell colon. Published23 July 2026 at 03:53 UTCModified26 July 2026 at 05:33 UTCAuthorFilip RoséenTags#shell#posix#unixTable of ContentsIn a land far-far away..Checking for required argumentsParameter expansion and the story of :?That.. other colonMore colons in the limelightCon-colon-sionFrequently Asked QuestionsWhy do I need the null-command? Doesn't the expansion happen without the colon?Why use the null-command when I could do VAR=${VAR:-default-value}?Why would I do any of these when it hurts readability? In a land far-far away.. # ...

Excerpt limited to ~120 words for fair-use compliance. The full article is at Refp.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from Refp