for file in wer srr do tail -50 "$file.txt" > temp.txt gnuplot <<- EOF set term png set output "$file.png" plot temp.txt" with lines notitle EOF done