#!/bin/bash [[ -z "$3" ]] && { echo "Plot2D for console. Arguments tsvplot FILE xCol yCol [plotStyle] [preBlock] e.g. tsvplot cal.tsv 2 4 or tsvplot cal.tsv Area Weight \"with lines;\" \"set title 'test plot';\" preBlock may contain any GNUPlot commands. plotStyle contains any plotting style commands. Requires csvkit and gnuplot " exit } fbase=$( basename "$1" ) csvcut -t -c "$2,$3" "$1" | gnuplot -e " set term dumb $(tput cols) $(tput lines) enhanced; set datafile separator \",\"; set xlabel '$2'; $5 plot '