annotate glang-galaxy-conf/kbws/emboss_single_outputfile_wrapper.pl @ 2:8947fca5f715 draft default tip

Uploaded
author ktnyt
date Fri, 26 Jun 2015 05:21:44 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
1 #! /usr/bin/perl -w
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
2 use strict;
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
3 use File::Copy;
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
4
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
5 my $cmd_string = join (" ",@ARGV);
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
6 my $results = `$cmd_string`;
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
7 my @files = split("\n",$results);
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
8 my $fileNameOut = $ARGV[6];
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
9 my ($drive, $outputDir, $file) = File::Spec->splitpath( $fileNameOut );
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
10 my $destination = $fileNameOut;
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
11
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
12 foreach my $thisLine (@files)
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
13 {
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
14 if ($thisLine =~ /Created /)
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
15 {
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
16 $thisLine =~ /[\w|\.]+$/;
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
17 $thisLine =$&;
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
18 #print "outfile: $thisLine\n";
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
19 #there is only one file to move, so we can quit after finding it
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
20 move($drive.$outputDir.$thisLine,$fileNameOut);
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
21 exit(1);
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
22 }
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
23 else
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
24 {
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
25 print $thisLine,"\n";
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
26 }
8947fca5f715 Uploaded
ktnyt
parents:
diff changeset
27 }