linelen not working as expected

  • Anonymous

    Anonymous - 2012-05-09

    linelen does not seem to be working as documented. Sample of the problem:

    C:\tmp>sfk linelen
    sfk linelen [options]
    sfk strlen phrase
       tell the length of text lines supplied via stdin
       or through command chaining, or tell the length
       of a single string.
    [ . . . ]
          sfk strlen "foo bar"
             results in a string length of 7.
          sfk filter foo.txt +linelen -all
             list the shortest and longest line of foo.txt
    C:\tmp>type foo.txt
    one hen
    two ducks
    three geese
    C:\tmp>sfk filter foo.txt +linelen -all
    error: unknown chain command: +linelen
    C:\tmp>sfk ver -own
    sfk     sfk     Base/XD windows-any     1.6.5           Swiss File Knife
    Mar  1 2012     -
    Microsoft Windows [Version 6.1.7601]

    This is the latest version of sfk, and the syntax I use is identical to the help text.

  • stahlworks

    stahlworks - 2012-05-10

    This is a bug that will be fixed. For now, you may only use:

    sfk filter foo.txt +strlen

    and it will give you the largest line length.

  • Anonymous

    Anonymous - 2012-05-10

    Wow, thanks for the prompt reply. I discovered that I can get the min and max data with this syntax, also:

    sfk linelen -i -all < foo.txt

    Thanks again.


Log in to post a comment.