Limo has asked for the wisdom of the Perl Monks concerning the following question:
The problem is that the new directory is not being created. What's wrong?my $home_dir= ($ENV{HOME}); my $date = $ARGV[0]; my $program = "/nfs/cooler/users/limo/bin/gen-cflowd-config"; my $matrix = "netmatrix"; my $config_path = "/nfs/cooler/users/limo/config/$date"; my $out_dir = "$home_dir/flowstats/configs/$date"; #If your "router-to-collect-flow" is not here, edit path below. my $config_file = "$home_dir/flowstats/router-to-collect-flow.$ARGV[0] +"; my %hash; my $host; my $line; my $key; my $string; my ($router, $cache, $nta, $as, $SampleRate); die "Usage: $0 <yyyymmdd> This program assumes:\n 1. the directory structure \$HOME/flowstats/configs.\n 2. you are running this on chipotle.\n If either of the above differs, you will need to make the appropriate modifications to this program.\n" unless @ARGV == 1; if (! -d "$out_dir") { system "mkdir $out_dir"; } chdir "$home_dir/flowstats/configs/$date" || die "Cannot change direct +ory:$!\n"; print "Writing configs to $out_dir\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
(jeffa) Re: External command problem
by jeffa (Bishop) on Mar 07, 2001 at 21:38 UTC | |
by Tyke (Pilgrim) on Mar 08, 2001 at 16:59 UTC | |
Re: External command problem
by AgentM (Curate) on Mar 07, 2001 at 22:15 UTC | |
Re: External command problem
by Limo (Scribe) on Mar 07, 2001 at 23:17 UTC |