#!/bin/bash

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

$(awk '/BEGIN COMMAND LINE ARGUMENTS/{p=1}/END COMMAND LINE ARGUMENTS/{p=0}!/#/{if(p==1) print}' $MAX_FILE)
