tux242 has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to resolve a permissions issue with either a touch from the shell side in an if then equality clause like if file is not present then create file in the script below so i do not have to chmod every 5 seconds through the iteration, any suggestions for this fix using Perl
#! /usr/bin/perl use strict; use warnings; my @SERVERS = ('server','server2','server3'); my $path = "/home/backup/nightly"; foreach my $this_server ( @SERVERS ) { #`if $this_server eq 0 then touch $this_server`; `chmod 775 *`; `cp $path/$this_server/etc_passwd ./passwds.$this_server`; `chmod 775 *`; }
Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: chmod permission issues
by Roy Johnson (Monsignor) on Nov 20, 2003 at 20:44 UTC | |
|
Re: chmod permission issues
by asarih (Hermit) on Nov 20, 2003 at 23:24 UTC |