ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/Processing/bin/fixFiles.sh
(Generate patch)

Comparing UserCode/MitProd/Processing/bin/fixFiles.sh (file contents):
Revision 1.1 by paus, Tue Feb 28 11:54:35 2012 UTC vs.
Revision 1.2 by paus, Fri Jan 18 22:55:24 2013 UTC

# Line 1 | Line 1
1 < #!/bin/bash
1 > #!/usr/bin/env perl
2 > use strict;
3   #===================================================================================================
4   # Assume a list of local files is found to be broken. Go through the list and recover one by one.
5   #===================================================================================================
6 < FILE="$1"
7 < FLAG="$2"
6 > my $file = "$ARGV[0]";
7 > my $flag = "$ARGV[1]";
8 > my $line = "";
9  
10 < while read line
11 < do
10 > open(INFO, $file) or die("Could not open file ($file).");
11 > foreach $line (<INFO>)  {  
12 >  print "\nNew file: $line";
13 >  system("fixFile.sh $line $flag")
14 > }
15 > close(INFO);
16  
17 <  fullFile=`echo $line | cut -d ' ' -f1`
18 <  fixFile.sh $fullFile $FLAG
19 <
20 < done < $FILE
17 > #FILE="$1"
18 > #FLAG="$2"
19 > #
20 > #while read line
21 > #do
22 > #
23 > #  echo "LINE: $line"
24 > #
25 > #  fullFile=`echo $line | cut -d ' ' -f1`
26 > #  echo fixFile.sh $fullFile $FLAG
27 > #  #fixFile.sh $fullFile $FLAG
28 > #
29 > #done

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines