I am beginner on C++ and linux and one of my tasks is extract the name of a file and compare if it is a new version or not. For example, the file name will be update_18.104.22.168.tar and I need to get the "22.214.171.124" portion to compare if it is the expected version or not.
Also, the path of my file will always be different, since the version number will change and i cant use /home/user/sample/temp/update_126.96.36.199.tar. How I address this also? can I do something like: /home/user/sample/temp/update_*.tar?