#!/usr/bin/perl -w use strict; my $msg = "Please turn off your machines"; for ( 1..10 ) { system ( "echo $msg | smbclient -M mach-$_" ); }