Jump to content
Read the Funtoo Newsletter: Summer 2023 ×

Split atom name to atom base and atom version


Recommended Posts

Hello together,

in my new project I am reading all ebuilds from a given path and then I would like to split the filename (string) that i found to its components: atom base and atom version.

For example:


I would like to get back

Atom base: portage

Atom version: 2.1.4_rc1

It would be even better if atom version will be split to "major.minor.micro" and "rc".

Thanks for your help



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...