Coder Social home page Coder Social logo

Comments (2)

arielf avatar arielf commented on June 24, 2024

Hi, and thanks for the report.

Interesting corner case I haven't thought about. I'd be inclined to classify this as a bug.

get_args() is not smart enough in the case there are multiple files, and the list is terminated by a file (without a column-spec).

Edit:

Looking deeper, it seems hard to fix because cuts repeats the last arg (column or file) whenever there's no pairing and alows flexible order of parameters. This enables it to work as expected and minimize typing, in many cases like:

# column vs file order is flexible
cuts -1 f1 f2 f3
cuts f1 f2 f3 -1 

and even

cuts f1 -1 f2 f2

All the above will print the last column of the files specified.

So in the corner case above what happens is 0 is paired with the file f1, and -1 is paired with f2.
Looks like I'll have to fix the documentation and help message.

And the work-around would be to repeat f1:

cuts f1 0 f1 -1 f2

from cuts.

pirance avatar pirance commented on June 24, 2024

Thanks

from cuts.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.