view 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 source

 #!/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