Replace, Preprocess, and Encodings/Disable line numbers for transformed output

Print cleaner replacement previews.

Section: Encodings and text quirks

Disable line numbers for transformed output

bash
bash
rg -N --replace '$1' '"([^"]+)"' data.json
Explanation

`-N` is handy when line numbers would clutter preview output.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Encodings and text quirks
Search a UTF-16LE file
Decode a file using a specific encoding.
OpenIn sheetbashsame section
Search Shift_JIS text
Decode legacy encoded content before matching.
OpenIn sheetbashsame section
Handle CRLF safely
Search Windows-style files as normal text.
OpenIn sheetbashsame section
Print NUL-delimited paths
Use NUL separators to make filename parsing safe.
OpenIn sheetbashsame section
Preview a simple replacement
Show what matched lines would look like after substitution.
OpenIn sheetbash2 tag match
Use capture groups in replacements
Reuse matched text in the replacement output.
OpenIn sheetbash2 tag match