DIFFERENCE(1)
β¨ NAME β¨
okay so difference β it compares two strings and prints a colorful diff π
periodt.
π SYNOPSIS π
difference [--split split] orig edit
π DESCRIPTION π
bestie. listen. difference takes your orig string and your edit string, looks at them side by side, and prints out a colorful representation of the difference straight to standard output β¨
that's it. that's the whole vibe. two strings go in, pretty diff comes out π¦
π¦ OPTIONS π¦
-s,--splitchar|word|line β picks how zoomed-in the diff gets, like choosing your camera lens on the level of detail π (default:word).
πΈ EXAMPLES πΈ
okay so before we get into it: in these examples, the text that would be printed in red is formatted in italics, and the text that would be printed in green is formatted bold. iykyk π
compare characters:
$ difference --split char brown green
bgroween
compare words:
$ difference --split word brown green
brown green
$ difference --split word "The quick brown fox jumps over the lazy dog." "The huge brown fox is cool."
The quick huge brown fox jumps over the lazy dog. is really cool.
compare lines:
$ difference --split word brown green
brown
green
$ difference --split word "The quick brown fox jumps over the lazy dog." "The huge brown fox is cool."
The quick brown fox jumps over the lazy dog.
The huge brown fox is cool.
$ difference --split line "Roses are red, violets are blue,
> I wrote this library here,
> just for you.
> (It's true)." "Roses are red, violets are blue,
> I wrote this documentation here,
> just for you.
> (It's quite true)."
Roses are red, violets are blue,
I wrote this library here,
I wrote this documentation here,
just for you.
(It's true).
(It's quite true).
and that's the whole page bestie π«Ά this wasDIFFERENCE(1)from the General Commands Manual, dated2019-01-23β go forth and diff slay πβ¨π
π¦ where this page comes from
- debian bookworm: difference 2.0.0-1+b6 Β· MIT
- debian trixie: difference 2.0.0-1+b14 Β· MIT
- ubuntu jammy: difference 2.0.0-1build2 Β· MIT
- ubuntu noble: difference 2.0.0-1build2 Β· MIT
- ubuntu resolute: difference 2.0.0-1build3 Β· MIT
- ubuntu stonking: difference 2.0.0-1build3 Β· MIT
- Copyright 2019 Robin Krahl <robin.krahl@ireas.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms