Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: chmod permission issues

by asarih (Hermit)
on Nov 20, 2003 at 23:24 UTC ( #308751=note: print w/replies, xml ) Need Help??


in reply to chmod permission issues

I think you want to look at umask.

But a bigger question is: Why do you want to use perl for this? When you have so many backticks, you should question if perl is the right tool at all.

It is much simpler in shell. For example, in ksh:

umask 002 set -A SERVERS server server2 server3 path="/home/backup/nightly" while (( $i < ${#SERVERS[*]} )); do cp ${path}/${i}/etc_passwd passwds.${i} (( i = i + 1 )) done

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://308751]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2022-08-15 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?