1.0.1 • Published 7 years ago

recursive-replace v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

Recursive Replace

Replaces all occurrence of the given pattern in a file, recursively, until the pattern is not found.

It's a simpler alternative to sed.

Install

npm i -g recursive-replace

Usage

The executable is available as rrp and recursive-replace.

Usage: rrp -p [pattern] -r [replace] [file]

Options:
  -0  The input file. stdin by default.
  -p  RegExp to search for.                                          [required]
  -r  The replace string. Null by default.

Example

Replace all occurrences of test by Test

rrp -p "test" -r "Test" file