#!/bin/bash
for FILE in "$@"
do
gnuplot <<- EOF
set term png
set output "${FILE}.png"
plot "${FILE}.txt" using 1
EOF
done