AutomationOpen SourceFreeActiveMachine-verified· beginner · ~2 min setup
Dedupe and Rank a Keyword List with Coreutils
Turn a messy keyword dump into a clean, frequency-ranked list using only shell builtins.
Run this workflow
CI-verified, 2/2 fixtures passing.
Build this with your agent
One copy-paste hands Claude Code, Codex, or Cursor the full recipe, steps included, nothing to fetch.
Intended Use
Anyone who pastes a raw keyword/tag dump and wants a deduped, frequency-sorted list without reaching for a tool or a SaaS.
Not for
- Datasets over a few million lines (use a real DB)
- Fuzzy/semantic dedupe, this is exact-match only
The Stack
Tested Against
bash@5.xcoreutils@9.xSide effects & data flow
- Network
- none, local only
- Writes
- ./ranked.txt
- Credentials
- none required
Steps
- 1
Normalize, count, and rank
Lowercase every line, collapse duplicates with a count, and sort by frequency descending.
printf 'RAG\nrag\nAgents\nrag\nAGENTS\nlocal-llm\n' | tr 'A-Z' 'a-z' | sort | uniq -c | sort -rn
Eval, 2 fixtures
Last passed: verified todayrag-ranked-topcontainstimeout 10s · max $0Expected:
3 ragclean-exitexit_codetimeout 10s · max $0Expected:
0
Results
Replaces a paid keyword-cleaning SaaS for a one-off task; runs in <1s.
Did this work for you?
Our CI checks the setup runs. You tell us if the whole thing worked. Tell us straight.
Related workflows
- Self-hosting the open-source stack? Prove your backup actually restores before you need it
- Chat with a CSV, but pin a known-answer guardrail so a wrong query cannot pass
- Advisor pattern: cap how often the expensive model gets called, and catch drift
- Route through a gateway with a tested open-weights fallback
- ReMe pattern: define prospective memory as a schedule your agent can tick off
- Grind a huge one-time job overnight on a free tier's tiny rate limit
Liked this workflow?
Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).