@ariabuckles/jsed
better sed, with js regexes & functions
Last updated 9 months ago by ariabuckles .
MIT · Original npm · Tarball · package.json
$ cnpm install @ariabuckles/jsed 
SYNC missed versions from official npm registry.

jsed

better sed, with js regexes & functions

Installation: npm install -g @ariabuckles/jsed

Usage:

jsed <search> <replacer>

Options:
  -V, --version     output the version number
  -f --file <file>  a file which to process; otherwise processes stdin
  -a --text         interpret the search arg as a string rather than a regex
  -s --string       interpret the replacer as a string even if it looks like a function
  -o --output       optional file to write to; otherwise writes to stdout
  -h, --help        output usage information

Examples:

> echo "use basic strings" | jsed "basic" "literal"
use literal strings
> echo "use regexes or funcs" | jsed '/\w+/g' "word=>'aaa'"
aaa aaa aaa aaa
> echo "use regexes without /s" | jsed '(regexes)' 'cool $1'
use cool regexes without /s

You can modify a file by specifying both -o and -f together:

> jsed -of test.txt 'search' 'replace'

Current Tags

  • 1.2.0                                ...           latest (9 months ago)

4 Versions

  • 1.2.0                                ...           9 months ago
  • 1.1.1                                ...           10 months ago
  • 1.1.0                                ...           10 months ago
  • 1.0.0                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 4
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |