Created
July 2, 2019 08:19
-
-
Save unakatsuo/64abd3ff70ab9d96131a4acf4ab8214e to your computer and use it in GitHub Desktop.
Onliner which compares kernel version just using coreutils.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# test/[, uname, sort and head are from coreutils. | |
% uname -r | |
4.20.11-1.el7.elrepo.x86_64 | |
% [ "4.12" == $((echo "4.12"; echo $(uname -r)) | sort --version-sort | head -1) ] | |
% echo $? | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment