Skip to content

Instantly share code, notes, and snippets.

@akutz
akutz / README.md
Last active May 13, 2025 12:19
Comparing semantic version strings in POSIX shell

Overview

The attached script provides a function for comparing semantic versions in a POSIX shell script.

Result Description
-1 A<B
0 A=B
1 A>B

Usage