Welcome to mirror list, hosted at ThFree Co, Russian Federation.

run-command-on-multiple-refsets.perl « support « ems « scripts - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1a7ef9e8e7f5e225412a9e3e5b94b5a88ab734c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl -w

use strict;

die("ERROR: syntax: run-command-on-multiple-refsets.perl cmd in out") 
    unless scalar @ARGV == 3;
my ($cmd,$in,$out) = @ARGV;

for(my $i=0;-e "$in.ref$i";$i++) {
    my $single_cmd = $cmd;
    $single_cmd =~ s/mref-input-file/$in.ref$i/g;
    $single_cmd =~ s/mref-output-file/$out.ref$i/g;
    system($single_cmd);
}