#!/bin/sh usage() { echo "usage: file ..." 1>&2 exit 1 } [ "$1" ] || usage files= while [ "$1" ]; do [ "$files" ] && files="$files, " files="$files\"$1\"" shift done gnuplot -persist <