aw

awk commands for `union`, `intersect`, `except`, `extra`

Hacker News

awk commands for `union`, `intersect`, `except`, `extra`

I'm munging text and I wrote these awk commands that may be useful to other coders. Feedback welcome. union (https://github.com/sixarm/union): print lines in (A union B) intersect (https://github.com/sixarm/intersect): print lines in (A intersect B) except (https://github.com/sixarm/except): print lines in (A except B) a.k.a. (A - B) extra (https://github.com/sixarm/extra) : print lines in (A extra B) a.k.a. (B - A) Examples: $ cat 1.txt alpha bravo $ cat 2.txt alpha charlie $ union 1.txt 2.txt alpha bravo charlie $ intersect 1.txt 2.txt alpha $ except 1.txt 2.txt bravo $ extra 1.txt 2.txt charlie

Share card

Actual performance

5points
1comments
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Hacker NewsMay not resonate with HN audience · Strong signals: io · Missing: https docs, excited, just released
42%42% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
41%41% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
39%39% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Product HuntUnlikely to reach the leaderboard · Strong signals: code · Missing: mac, agents, macos
19%19% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
17%17% predicted probability of success on BetaList, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
17%17% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
Indie HackersIH features products with proven revenue · Missing: supports, reddit linkedin, podcasting
15%15% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ht
Httpies – httpie with extra headers43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Httpies – httpie with extra headers

Hacker News4
Re
Re-reselect – Extra memoization for reselect selectors54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Re-reselect – Extra memoization for reselect selectors

Hacker News2
Re
Redis-GIS – Geospatial and Geofencing Commands for Redis55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Redis-GIS – Geospatial and Geofencing Commands for Redis

Hacker News4
Wr
Wrapper for Executing Commands in Go33%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Wrapper for Executing Commands in Go

Hacker News5
Vi
Vim-pnpm Bindings for pnpm commands in Vim41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Vim-pnpm Bindings for pnpm commands in Vim

Hacker News3
Extramarks
Extramarks30%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Extra intelligence by Extramarks

Product Hunt+7
EXTRA - Opensourced GPT Astra 6
EXTRA - Opensourced GPT Astra 652%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Get extra from your AI.

Indie Hackerscommitment-full-time
Ge
Generate Curl Commands in a Webapp45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generate Curl Commands in a Webapp

Hacker News2
Ba
Bashfs – Run commands as your filesystem73%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Bashfs – Run commands as your filesystem

Hacker News97
Ru
Run synchronous and asynchronous commands in WebDrivers51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Run synchronous and asynchronous commands in WebDrivers

Hacker News2