in reply to Script which creates 2nd script and runs it
open (STDOUT, ">$script"); creates the script in the current directory.
system "chmod 755 /export/home/ss/flowstats/config/$date/$script"; chmod's the script in a directory with an absolute path.
system "./export/home/ss/flowstats/config/$date/$script"; runs the script in a directory relative to the current directory.
I'm not sure why you want to create this shell script, however, instead of just using Perl's builtin filetest operators and mkdir. (There's also a chmod.)
Update: For the commands that need to be run externally, you should use system or qx//, as suggested in reponse to your node from yesterday.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Script which creates 2nd script and runs it
by Tuna (Friar) on Feb 01, 2001 at 01:40 UTC | |
|
Re: Re: Script which creates 2nd script and runs it
by Tuna (Friar) on Feb 01, 2001 at 01:45 UTC | |
by chipmunk (Parson) on Feb 01, 2001 at 01:55 UTC |