diff options
author | Dimagog <dima_kakurin@hotmail.com> | 2018-08-22 15:23:04 -0700 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2018-08-22 18:23:04 -0400 |
commit | 72db9ed39fa200fd86f41e356e23a10cff7b0366 (patch) | |
tree | 18277581352b7504337d3804f45f74121da7e4ec /src/main.rs | |
parent | 7e572e92d568b4d7f4bdfc06eb1d0acbe43ac996 (diff) |
xsv: add reverse command
reverse command to reverse rows of CSV data.
Unlike sort command, it preserves order of rows with the same key.
PR #134
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 31c9958..c1465a3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,6 +56,7 @@ macro_rules! command_list { join Join CSV files partition Partition CSV data based on a column value sample Randomly sample CSV data + reverse Reverse rows of CSV data search Search CSV data with regexes select Select columns from CSV slice Slice records from CSV @@ -150,6 +151,7 @@ enum Command { Input, Join, Partition, + Reverse, Sample, Search, Select, @@ -178,6 +180,7 @@ impl Command { Command::Input => cmd::input::run(argv), Command::Join => cmd::join::run(argv), Command::Partition => cmd::partition::run(argv), + Command::Reverse => cmd::reverse::run(argv), Command::Sample => cmd::sample::run(argv), Command::Search => cmd::search::run(argv), Command::Select => cmd::select::run(argv), |