Hello,

I'm trying to get a file to copy to all users home directories.  When I
run it as root below, it does not produce any error, but it does not copy
/etc/sofficerc to .sofficerc in each directory in /home, as I expected.

What am I missing here?

Thanks,
Gabe

#!/usr/bin/perl -w
# simple script by GG to make sure .sofficerc is in user home directories
# 9/20/2001

my $dirname = "/home";
my $name;
my $symlink = "/etc/sofficerc";

opendir HOME, $dirname or die "Cannot open $dirname: $!";
while (my $name = readdir HOME) {
print "$name ";

 next if $name =~ /^\./; # skip over dotfiles
 next unless -d $name;
 $name = "$dirname/$name";

 symlink $symlink, "$name/.sofficerc";
 closedir HOME;
}



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to