commit 1444d5cc01d139bfebc8c139c0dcbc66bdd0ee45 from: mischa date: Thu May 09 18:33:27 2024 UTC if vmXX.txt is passed to notify.pl strip .txt commit - 06b1de99fa0c5f5f30fe9fab65b55f55eeb394a9 commit + 1444d5cc01d139bfebc8c139c0dcbc66bdd0ee45 blob - faf6136104f527b47285fc0a93f460dd705ee181 blob + 6f71afaafc2a510cdc7fd9df1d34558b2a53f743 --- notify.pl +++ notify.pl @@ -34,7 +34,11 @@ my $function = $ARGV[0] || "empty"; my $function_variable = $ARGV[1] || "empty"; my $message = $ARGV[2] || "empty"; -$function_variable = substr $function_variable, 0, -4 if ($function_variable =~ m/.txt/); +if ($function_variable =~ m/.txt/) { + $function_variable = substr $function_variable, 0, -4; + $function_variable = substr $function_variable, 4; + say $function_variable; +} # define the prices for the different components of the VM my $base_price = '67';