Permalink
Browse files

improve run script. Thx @tammofreese

  • Loading branch information...
1 parent 05d52a1 commit 39ef83e5fd09e0f4c998d2200d1d068a7ff7ad4c @phuesler phuesler committed May 21, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 character_count.rb
  2. +1 −1 run.sh
View
@@ -0,0 +1 @@
+puts File.open(ARGV[0],'r').read.gsub(/^=begin.*?^=end\n/m,'').gsub(/^#.*?\n/,'').gsub(/\n\Z/m,'').length
View
@@ -1 +1 @@
-for file in *.rb; do echo "#### $file #### `cat $file | egrep -v '^#' | wc -m` characters \n"; ruby $file; echo "\n\n\n"; done
+for file in *.rb; do echo "#### $file #### `ruby character_count.rb $file` characters \n"; ruby $file; echo "\n\n\n"; done

0 comments on commit 39ef83e

Please sign in to comment.