Giter VIP home page Giter VIP logo

filesort's Introduction

Release versions

Note that main is generally a work in progress, and you probably want to use a tagged release version.

Version 4 breaking changes

If you have used version 3 or below, there are breaking changes in version 4. The entire command line arguments has been re-worked to be more in line with the unix/linux standards.

Quick start

To use filesort you pass in the name of the file you want sorted along with several optional parameters.

  • -i, --input arg, Source file to sort
  • -o, --output arg, Destination file to write to
  • -d, --descending, Sort file in descending order
  • -v, --version, Filesort version
  • -h, --help, Filesort help
  • -l, --length arg, Number of characters to read, overrides -w
  • -w, --word, Reads data in per word rather than per line
  • --delim arg, Value to append to end of each sorted value defaults to newline

Example

  • filesort -i test.txt Sorts the file test.txt in ascending order
  • filesort -i test.txt -o output.txt -d Reads the data from test.txt and writes it in descending order to output.txt

Requirements

The only build requirement is a C++ compiler that supports C++17. I have tested using Visual Studio 2019, GCC 13.2.0, and Clang 17.0.6.

Getting

git clone --recursive https://github.com/jlechem/filesort

Building

  • Windows - Open the filesort.sln solution file in Visual Studio and build accordingly.
  • Unix/Linux - In the filesort directory is a MAKEFILE, this should be used to build the project. Note it is currently set to GCC (see mac OS for clang) The following make commands are supported make make clean make install
  • OS X (mac) - Run the following clang command clang++ -Wall -std=c++17 *.cpp -o filesort

filesort's People

Contributors

jlechem avatar

filesort's Issues

Investigate in memory insert sort

Instead of reading all the files into memory then sorting, it may be more economical/faster to read each item and create the sorted values during the file read. It may turn out in most cases this simply isn't needed or even any faster.

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.