compact-shellscript.sed
changeset 1 dbce0b16b0c1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compact-shellscript.sed	Tue Jun 23 09:51:01 2009 -0400
@@ -0,0 +1,7 @@
+#!/bin/sed -f
+# Remove comments, except for the shebang
+s/^ *#[^!#].*$//
+# Remove spaces at the beginning of all lines
+s/^ *//
+# Remove empty lines
+/^$/d