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