### daemon - lists and starts scripts from /etc/rc.d ### may be useful under Slackware use strict; my $rc_dir = q|/etc/rc.d|; my @coms = grep {-f && -x} glob "$rc_dir/*"; my %coms; my $com; @coms = grep{/.{2,}/} map {s|.+/rc\.(.+?)\W*$|$1| and $_} @coms; $" = $/ and die "@coms", $/ unless @ARGV; $com = shift; @coms{@coms} = (); exists $coms{$com} or die qx{"$rc_dir/rc.$com"},$/; print for qx{"$rc_dir/rc.$com" "@ARGV"};