coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tsort: "odd input of tokens" with paired input


From: Assaf Gordon
Subject: Re: tsort: "odd input of tokens" with paired input
Date: Wed, 6 Apr 2016 09:51:33 -0400

Hello,

> On Apr 6, 2016, at 06:45, Michael V. Antosha <address@hidden> wrote:
> On 4/6/16, Alad Wenter <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]