use Data::Dumper qw(Dumper);
m|^shell=(.+)$| && ( $pip_shell = basename($1), next );
$versions{'10'} = '10.6';
$versions{'11'} = '10.7';
$versions{'12'} = '10.8';
$versions{'13'} = '10.9';
$versions{'14'} = '10.10';
$versions{'15'} = '10.11';
$versions{'16'} = '10.12';
$versions{'17'} = '10.13';
$versions{'18'} = '10.14';
$versions{'19'} = '10.15';
$versions{'20'} = '11.0';
$versions{'21'} = '12.0';
open( VER, "uname -r | awk -F. '{print $1}' |" );
$os_version= %versions{@elems[0]};
($rootver,$dirt, $tail) = $pip_shell =~ m/.*casashell-(\d+\.\d+\.\d+\.\d+)([^-]*)-(.*)/i;
print("casa-$rootver$dirt-$os_version.dmg")