NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/60810: /usr/src/sys/conf/osrelease.h -s behavior does not match description



    Date:        Tue, 29 Sep 2026 14:44:01 -0400
    From:        Rob Whitlock <rwhitlock22%gmail.com@localhost>
    Message-ID:  <EFE27712-A3F7-4F5D-94A0-A2E8F30BF7D7%gmail.com@localhost>

  | and way too heavyweight to just get the output of uname -r.

The following is effectively uname -r based upon a sys/param.h file
It took all of 20 seconds to write:

sed -n	-e '/^#define.*__NetBSD_Version__/!d'	\
	-e 's;^.*/\* NetBSD ;;'			\
	-e 's; \*/.*$;;' -e p -e q < ..../sys/param.h

change the .... part to whatever you need.

kre



Home | Main Index | Thread Index | Old Index