#!/bin/bash

if [ $# -ne 1 ]; then
  echo "Usage: max2param <FILE.max>"
  exit 2
fi
MAX_FILE=$1

awk '/BEGIN PARAMETERS/{p=1}/END PARAMETERS/{p=0}!/#/{if(p==1) print}' $MAX_FILE | grep -v "OUTPUT_BASE_NAME"
