Displaying 1 result from an estimated 1 matches for "cutversion".
Did you mean:
curversion
2012 Feb 16
2
Basic string manipulation in puppet
...,
Been searching the net for a few hours now.
I have a basic operation I wish to perform but, cannot find examples
close enough to what I''m after to implement it myself.
This is what I want to do:
$version = ''10.2.0''
I want to manipulate the string to make a new var ($cutversion), equal
just 102.
For example in perl (since I know it):
$version = ''10.2.0'';
if ($version =~ /^(\d+)\.(\d+).*$/) {
$cutversion = $1 . $2;
}
Any help?
Thanks,
Aaron.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" grou...