Skip to content
ar2731Public

About

A command-line utility for sorting text files.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

SortLines

SortLines is a command-line utility written in C# for sorting text files.

Requirements

  • Windows
  • .NET Framework 3.5
  • Platform target: AnyCPU

Tested environment

  • Windows 7 SP1 (64-bit)

Features

  • Sort text files in ascending or descending order.
  • Remove duplicate lines.
  • Select the comparer used for sorting.
  • Select the text encoding.
  • Display the list of available encodings.
  • Optionally delete the source file after processing.
  • Control destination file overwriting.

Usage

SortLines <source> <destination> [options]

The first two arguments specify the source file and destination file. Additional arguments control the sorting operation.

Options

Option Description
-d Delete the source file after writing the destination.
-u Remove duplicate lines.
-c:n Select the comparer by index.
-e:n Select the text encoding by index.
-e: Display available encodings.
-f Overwrite the destination file.
-r Sort in descending order.
-h Display help.

Running the program without arguments also displays help.

Default settings

  • Comparer: index 4 (StringComparer.Ordinal). Performs a case-sensitive, culture-independent comparison based on the Unicode values of the characters. Uppercase and lowercase letters are treated as different characters.
  • Encoding: utf-8-no-bom (UTF-8 without a byte order mark).

Author

ar2731

GitHub profile

Source code

About

A command-line utility for sorting text files.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages