parsing fields of a file
I have a file containing the list of rpms as below:
I would like to extract the rpm ( excluding the version details)
My problem is if the list simply contained rpms like
and so on... If it contained the entries only like
then it would not have been a problem as i can grep the first field using - as a delimiter. But here as it has other entries like
It is not possible to do so. ( In the case of automake17-1.7.9-5), I simply need the output as automake.
How do I do it ? Your help will be highly appreciated