I have two strings, runnung kernel and installed kernel:
uname -r | cut -d- -f1,2,3
pacman -Q linux | cut -d’ ’ -f2 | sed -e ‘s/.([^.]*)$/-\1/’
I am seeking a way to get a similar string containing the latest kernel in the repo, but unfortunately none of my approaches succeed. If you have any idea I’d highly appreciate!