#!/bin/bash options=() # the buffer array for the parameters while [[ $1 ]] do case "$1" in -e) options+=("--eltorito-boot") shift ;; *) options+=("$1") shift ;; esac done echo Calling genisoimage.dist "${options[@]}" eval exec /usr/bin/genisoimage.dist "${options[@]}"