Skip to content

Latest commit

 

History

History
74 lines (50 loc) · 2.43 KB

File metadata and controls

74 lines (50 loc) · 2.43 KB

edit

Replace the value of a cell specified by its row and column.

Table of Contents | Source: src/cmd/edit.rs

Description | Examples | Usage | Edit Options | Common Options

Description

Replace the value of a cell specified by its row and column.

Examples

items.csv

item,color
shoes,blue
flashlight,gray

To output the data with the color of the shoes as green instead of blue

qsv edit items.csv color 0 green
item,color
shoes,green
flashlight,gray

You may also choose to specify the column name by its index (in this case 1). Specifying a column as a number is prioritized by index rather than name. If there is no newline (\n) at the end of the input data, it may be added to the output. See also https://github.com/dathere/qsv/wiki/Transform-and-Reshape#edit

Usage

qsv edit [options] <input> <column> <row> <value>
qsv edit --help

Edit Options

     Option      Type Description Default
 ‑i,
‑‑in‑place 
flag Overwrite the input file data with the output. The input file is renamed to a .bak file in the same directory. If the .bak file already exists, the command errors instead of overwriting it. Symbolic links are rejected; pass the resolved path instead. (Other Windows reparse points such as junction points are not detected.)

Common Options

     Option      Type Description Default
 ‑h,
‑‑help 
flag Display this message
 ‑o,
‑‑output 
string Write output to instead of stdout.
 ‑n,
‑‑no‑headers 
flag Start row indices from the header row as 0 (allows editing the header row).

Source: src/cmd/edit.rs | Table of Contents | README