edit

May 31, 2026 · View on GitHub

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     TypeDescriptionDefault
 ‑i,
‑‑in‑place 
flagOverwrite 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     TypeDescriptionDefault
 ‑h,
‑‑help 
flagDisplay this message
 ‑o,
‑‑output 
stringWrite output to instead of stdout.
 ‑n,
‑‑no‑headers 
flagStart row indices from the header row as 0 (allows editing the header row).

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