Hi Everybody
This my first message in this forum

so # echo "Hello world!"

Now about issue that I I have :
I have output of command that give me list of packages that I need to compile :
Code:
# equery d mesa
[ Searching for packages depending on mesa... ]
virtual/glu-7.0 (media-libs/mesa)
virtual/opengl-7.0 (media-libs/mesa)
x11-base/xorg-server-1.7.7-r1 (!minimal? >=media-libs/mesa-7.4[nptl=])
x11-misc/fireflies-2.07 (media-libs/mesa)
I need to give this list into input of compile command , but without part inside () also without package version that always goes after '-'.
on other words I should get such line : "virtual/glu virtual/opengl x11-base/xorg-server x11-misc/fireflies"
Here what I done till now ( I will replace echo with compile command after I get to correct version of course

)
Code:
#echo $(equery d mesa | awk '{ print $1 }'|sed 's/-//')
virtual/glu7.0 virtual/opengl7.0 x11base/xorg-server-1.7.7-r1 x11misc/fireflies-2.07
As I understand problems starts after sed gets to package "x11base/xorg-server-1.7.7-r1" that have '-' not only as version delimeter but also as part of package name.
How can I solve this ?
Also if somebody can suggest totally different way of solving this task I will be glad to see it