IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10625


Ignore:
Timestamp:
Dec 11, 2006, 1:35:17 PM (19 years ago)
Author:
Paul Price
Message:

Need to quote arguments with whitespace with this latest version of IPC::Cmd

Location:
trunk/ippScripts/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/phase0_exp.pl

    r10591 r10625  
    160160    }
    161161 
     162    # Quote arguments with whitespace
     163    for (my $i = 0; $i < scalar @command; $i++) {
     164        if ($command[$i] =~ /\s/) {
     165            $command[$i] = "\'$command[$i]\'";
     166        }
     167    }
     168
    162169    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    163170        cache_run(command => \@command, verbose => 1);
  • trunk/ippScripts/scripts/phase0_imfile.pl

    r10534 r10625  
    1313use PS::IPP::Metadata::Config;
    1414use PS::IPP::Metadata::Stats;
     15use Data::Dumper;
    1516
    1617use PS::IPP::Config;
     
    114115    foreach my $constant (keys %{CONSTANTS()}) {
    115116        push @command, CONSTANTS->{$constant}, ($stats->data($constant))->{value};
     117
    116118    }
    117119    foreach my $variable (keys %{VARIABLES()}) {
     
    139141        push @command, "NAN";
    140142    }
    141  
     143
     144    # Quote arguments with whitespace
     145    for (my $i = 0; $i < scalar @command; $i++) {
     146        if ($command[$i] =~ /\s/) {
     147            $command[$i] = "\'$command[$i]\'";
     148        }
     149    }
     150
    142151    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    143152        run(command => \@command, verbose => 1);
Note: See TracChangeset for help on using the changeset viewer.