root/trunk/tsuite/auto/editnostring.pl

Revision 13, 0.5 kB (checked in by gary, 3 years ago)

adjust file properties for ascii and perl files - no source change

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!perl -w
2#   #!/usr/bin/perl/
3
4
5# edit all input models that do not match a certain string 
6
7$nMod = 0;
8while(defined($input= glob("*.in")) )
9{
10        system "grep 'punch dr'  $input >checkend.txt";
11
12#       if non-zero length, model had botched asserts
13#       -s option returns number of bytes if file exists and has finite size
14        if( (-s "checkend.txt")==0 )
15        {
16           ++$nMod;
17
18#         actually view the output
19          system "gvim $input";
20        }
21}
22printf( "\n %i models had the string, and were edited.\n ",$nMod);
Note: See TracBrowser for help on using the browser.