Tired of looking up when a certain release was made?

$ release=buzz
$ awk -F "," -v awkvar="$release" '{ if ($3 ~ awkvar) print $4}' /usr/share/distro-info/debian.csv

also works in busybox
you need the distro-info-data package for the .csv file

turns out there were 2 errors in the above snippit:
1) "print $4}" -> "print $5}"
we want the release date, not when it was created as that tends to be the date of the previous stable release
2) "if ($3 ~ awkvar)" -> "if ($3 == awkvar)"
this worked most of the times, but the old statement matched both 'Etch' and 'Stretch', so do an exact match.

So the correct code is:

$ release=buzz
$ awk -F "," -v awkvar="$release" '{ if ($3 == awkvar) print $4}' /usr/share/distro-info/debian.csv

Show thread

@FreePietje Didn’t knew that /usr/share/distro-info exists. Good to know

Sign in to participate in the conversation
unidentified instance

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!