csv-txt-excel-parallel-toolkit 0.4.7

A parallel and fast command line toolkit for small and large (>10G) CSV, TXT, and EXCEL files, with a unified api.
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::utils::cli_result::CliResult;
use std::io::{stdin, BufRead};

pub fn run(sep: &str) -> CliResult {
    // open file and header
    if let Some(r) = stdin().lock().lines().next() {
        r?.split(sep)
            .enumerate()
            .for_each(|(u, r)| println!(" {u:<5}{r}"));
    }

    Ok(())
}