$ perl -lne 'print $_ if $_ =~ /[^"]$/' < test.csv no quote at end quote and space at end" quote and tab at end"