how to explain that awk in red doesn't return version numbers?
is it caused by ++- in the variable?
is it possible to get it working with the variable?
Code:
$ A="libstdc++-devel"
$ rpm -qa|grep ^${A}-[0-9]
libstdc++-devel-3.3.2-5
[red]$ rpm -qa|grep ^${A}-[0-9]|awk -F "${A}" '{print $2}'|cut -d- -f2-[/red]
$ A="zlib"
[green]$ rpm -qa|grep ^${A}-[0-9]|awk -F "${A}" '{print $2}'|cut -d- -f2-[/green]
1.2.5-1
$