[cig-commits] r7934 - cs/stats/trunk
sue at geodynamics.org
sue at geodynamics.org
Wed Sep 5 15:24:34 PDT 2007
Author: sue
Date: 2007-09-05 15:24:34 -0700 (Wed, 05 Sep 2007)
New Revision: 7934
Added:
cs/stats/trunk/rm_empty.py
Removed:
cs/stats/trunk/rm_empty
Log:
Make rm_empty not use excessive memory
Deleted: cs/stats/trunk/rm_empty
===================================================================
--- cs/stats/trunk/rm_empty 2007-09-05 22:21:12 UTC (rev 7933)
+++ cs/stats/trunk/rm_empty 2007-09-05 22:24:34 UTC (rev 7934)
@@ -1,5 +0,0 @@
-for f in `ls`; do
- if [ -z "`cat $f`" ]; then
- rm -f $f
- fi
-done
Added: cs/stats/trunk/rm_empty.py
===================================================================
--- cs/stats/trunk/rm_empty.py 2007-09-05 22:21:12 UTC (rev 7933)
+++ cs/stats/trunk/rm_empty.py 2007-09-05 22:24:34 UTC (rev 7934)
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+import os
+for f in os.listdir("."):
+ if os.path.getsize(f)==0:
+ os.remove(f)
Property changes on: cs/stats/trunk/rm_empty.py
___________________________________________________________________
Name: svn:executable
+ *
More information about the cig-commits
mailing list