diff strip_header.sh @ 0:e77c9484b2d0 draft default tip

Uploaded
author saskia-hiltemann
date Thu, 22 Oct 2015 09:18:30 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/strip_header.sh	Thu Oct 22 09:18:30 2015 -0400
@@ -0,0 +1,11 @@
+ #!/bin/bash
+ 
+inputfile=$1
+outputfile=$2
+header=$3
+commentchar=$4
+
+echo "commentchar: -${commentchar}-"
+ 
+sed -e "/^${commentchar}/d" -e '/^$/d' $inputfile > $outputfile
+sed -n "/^${commentchar}/p"  $inputfile > $header