#!/bin/bash
# Parameter handling
mod_base="."
case $# in
1)
input_file="$1"
output_dir1="$(basename "$input_file" | sed -r 's/(.*)\.[^\.]*/\1/')"
;;
2)
mod_base="$1"
input_file="$2"
output_dir1="$(basename "$input_file" | sed -r 's/(.*)\.[^\.]*/\1/')"
;;
3)
mod_base="$1"
input_file="$2"
output_dir1="$3"
;;
*)
echo "usage: $0 [] [