|
From: Oliver S. <ol...@f-...> - 2010-08-26 00:34:39
|
Hello, maybe someone can tell me whether my little shell snippet is based on the right assumptions in order to find the Valgrind version: valgrind --version|sed 's/valgrind-//g;s/\([0-9]*\.[0-9]\)\..*/\1/' Can one rely on the format of the string being "valgrind-x.y.z[whatever]" (where x.y are the major and minor version number)? The default seems to be "valgrind-x.y.z" but on Ubuntu I've seen "valgrind-3.6.0.SVN-Debian" and I'm only after major and minor version number as I presume that similar incompatibilities would not get introduced with patch releases (where z varies). Thanks, // Oliver PS: The reason has to do with the incompatibility between 3.5 and 3.6, so I can pick the proper header when building my binary. |
|
From: Nicholas N. <n.n...@gm...> - 2010-09-16 00:11:08
|
On Wed, Aug 25, 2010 at 5:34 PM, Oliver Schneider <ol...@f-...> wrote: > > maybe someone can tell me whether my little shell snippet is based on > the right assumptions in order to find the Valgrind version: > > valgrind --version|sed 's/valgrind-//g;s/\([0-9]*\.[0-9]\)\..*/\1/' > > Can one rely on the format of the string being > "valgrind-x.y.z[whatever]" (where x.y are the major and minor version > number)? > > The default seems to be "valgrind-x.y.z" but on Ubuntu I've seen > "valgrind-3.6.0.SVN-Debian" and I'm only after major and minor version > number as I presume that similar incompatibilities would not get > introduced with patch releases (where z varies). For released versions we use valgrind-x.y.z but who knows what Debian and other packagers might do. Nick |
|
From: Andrés R. <ar...@de...> - 2010-09-16 11:59:29
|
Something like this could work for any case: sed -e 's/valgrind-\([0-9]\)\.\([0-9]\).*/\1 - \2/g' $ echo valgrind-3.6.0.SVN-Debian | sed -e 's/valgrind-\([0-9]\)\.\([0-9]\).*/\1 - \2/g' 3 - 6 $ echo valgrind-3.6.0 | sed -e 's/valgrind-\([0-9]\)\.\([0-9]\).*/\1 - \2/g' 3 - 6 $ echo valgrind-3.6.0whateveryouwant | sed -e 's/valgrind-\([0-9]\)\.\([0-9]\).*/\1 - \2/g' 3 - 6 Andrés Roldán On Wed, Sep 15, 2010 at 7:10 PM, Nicholas Nethercote <n.n...@gm... > wrote: > On Wed, Aug 25, 2010 at 5:34 PM, Oliver Schneider <ol...@f-...> > wrote: > > > > maybe someone can tell me whether my little shell snippet is based on > > the right assumptions in order to find the Valgrind version: > > > > valgrind --version|sed 's/valgrind-//g;s/\([0-9]*\.[0-9]\)\..*/\1/' > > > > Can one rely on the format of the string being > > "valgrind-x.y.z[whatever]" (where x.y are the major and minor version > > number)? > > > > The default seems to be "valgrind-x.y.z" but on Ubuntu I've seen > > "valgrind-3.6.0.SVN-Debian" and I'm only after major and minor version > > number as I presume that similar incompatibilities would not get > > introduced with patch releases (where z varies). > > For released versions we use valgrind-x.y.z but who knows what Debian > and other packagers might do. > > Nick > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |