Hello,

> On Apr 6, 2016, at 06:45, Michael V. Antosha <[email protected]> 
> wrote:
> On 4/6/16, Alad Wenter <[email protected]> wrote:
>> Hello,
>> 
>> When trying to run tsort on a moderately large
>> paired list, I get:
>> 
>> tsort: -: input contains an odd number of
>> tokens
> head -89 pre_tsort.txt | tsort  # success
> # First 89 lines are okay.  Line 90 is bad.

<shameless plug>

The recent version of GNU Datamash ( http://gnu.org/s/datamash ) has a new 
operation 'check' to quickly diagnose cases like this (non-tabular file 
structure) and provide verbose report of the problem.

Example:

    $ curl -s https://ptpb.pw/c1Vu > test.txt
    $ datamash -W check < test.txt
    line 89 (2 fields):
     cower cower
    line 90 (3 fields):
     deluge-labelplus deluge gtk2
    datamash: check failed: line 90 has 3 fields (previous line had 2)


The '-W' parameter tells datamash to use whitespace as field-separator (default 
is tab).
</shameless plug>


regards,
 - assaf


Reply via email to