Script for removing unused cells
diff --git a/scripts/removeDRCcells.pl b/scripts/removeDRCcells.pl
new file mode 100644
index 0000000..97b2b94
--- /dev/null
+++ b/scripts/removeDRCcells.pl
@@ -0,0 +1,33 @@
+#!/usr/bin/perl -w
+
+foreach my $mag (<*.mag>)
+{
+  my $cell=$mag; $cell=~s/\.mag$//;	
+  print "Checking $cell\n";
+  my $STDCELLLIB=$ENV{'STDCELLLIB'};
+  my $drc=0;
+  if(open(IN,"<$STDCELLLIB/Catalog/$cell.drc"))
+  {
+    while(<IN>)
+    {
+      $drc=$1 if(m/Number of DRC errors: (\d+)/);
+    }
+    close IN;
+  }
+  else
+  {
+    print "Error: Could not find DRC: $STDCELLLIB/$cell.drc $!\n";
+    $drc=1;
+  }
+  if($drc)
+  {
+    print "Removing cell with $drc DRC issues:\n";
+    unlink $mag;
+    unlink "../lef/orig/$cell.lef";
+    unlink "../lef/$cell.lef";
+    unlink "../gds/$cell.gds";
+    unlink "../lib/$cell.lib";
+  }
+
+}
+