csv-exec runs a command for each line of a CSV file. The command's arguments are replaced by the value of the CSV columns. The output is written in a new column.

```sh $ cat test.csv Id,Dir 24,example.com/a 68,example.com/b

$ csv-exec 'echo $1/$0'

The regex that parses the arguments can be changed:

sh $ csv-exec 'echo €1/€0' --arg-regex '€([0-9]+)' <test.csv Id,Dir,Result 24,example.com/a,example.com/a/24 68,example.com/b,example.com/b/68

The help, generated by clap:

```sh $ csv-exec -h csv-exec 0.2.0 niladic git@nil.choron.cc Execute a command on each record of a CSV.

USAGE: csv-exec [FLAGS] [OPTIONS]

FLAGS: -h, --help Prints help information -n, --no-header Do not read the first line as a header line -V, --version Prints version information

OPTIONS: --arg-regex Regex used to parse the column position in the command args. Syntax: https://docs.rs/regex/1.3.4/regex/index.html#syntax [default: \$([0-9]+)] -d, --delimiter CSV delimiter (\t for tabs) [default: ,] -i, --input Input CSV file [stdin by default] --new-column-name Name of the new column which contains the results [default: Result] -o, --output Output CSV [stdout by default] --quote CSV quote [default: "]

ARGS: The command to execute ```