#!/usr/bin/env bash
set -o errexit -o errtrace -o nounset -o pipefail
filter_empty_parameters() {
local -a aParameters=()
for sParameter in "$@";do
if [[ "${sParameter}" != "" ]];then
aParameters+=( "${sParameter}" )
fi
done
for sParameter in "${aParameters[@]}";do
echo ": '${sParameter}'"
done
}
filter_empty_parameters 'a' '' 'b b' c ' ' d 'e ' '' ' f'
IyEvdXNyL2Jpbi9lbnYgYmFzaAoKc2V0IC1vIGVycmV4aXQgLW8gZXJydHJhY2UgLW8gbm91bnNldCAtbyBwaXBlZmFpbAoKZmlsdGVyX2VtcHR5X3BhcmFtZXRlcnMoKSB7CiAgICBsb2NhbCAtYSBhUGFyYW1ldGVycz0oKQoKICAgIGZvciBzUGFyYW1ldGVyIGluICIkQCI7ZG8KICAgICAgICBpZiBbWyAiJHtzUGFyYW1ldGVyfSIgIT0gIiIgXV07dGhlbgogICAgICAgICAgICBhUGFyYW1ldGVycys9KCAiJHtzUGFyYW1ldGVyfSIgKQogICAgICAgIGZpCiAgICBkb25lCgogICAgZm9yIHNQYXJhbWV0ZXIgaW4gIiR7YVBhcmFtZXRlcnNbQF19IjtkbwogICAgICAgIGVjaG8gIjogJyR7c1BhcmFtZXRlcn0nIgogICAgZG9uZQp9CgpmaWx0ZXJfZW1wdHlfcGFyYW1ldGVycyAnYScgJycgJ2IgYicgYyAnICcgZCAnZSAnICcnICcgZicK