#!/bin/bash

# Generate manpage
# C 2014 Eriberto

NAME=$(cat header.txt | cut -d" " -f2 | tr [A-Z] [a-z])
LEVEL=$(cat header.txt | cut -d" " -f3 | tr -d '"')

cat header.txt > $NAME.$LEVEL
txt2man $NAME.txt | grep -v '^.TH ' >> $NAME.$LEVEL
