A more ergonomic sed using JavaScript regexes
A more ergonomic sed using JavaScript regexes
I love `sed`, but specifying in-place replacement across linux/mac is challenging, and I find both the regular expression options hard to remember the exact syntax for. So I built a small wrapper around String.prototype.replace to give the syntax and power of javascript regular expressions (and, optionally, javascript functions): https://github.com/ariabuckles/jsed Or to install: npm install -g @ariabuckles/jsed Some examples: You can use it pretty similarly to `sed`: echo "this is a test" | jsed '\w+' 'word:$&' > word:this word:is word:a word:test Or you can use it more like javascript when needed: echo "1 2 3 4" | jsed '/\d+/g' '(num) => num%2 == 0 ? "even" : "odd"'
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
“Why Using Jsdoced JavaScript?” – Test Your JavaScript with Jsdoc
Text Steganography for JavaScript using Markov Chains
Design your own t-shirt using JavaScript
Emacs-ng – Run JavaScript in Emacs using Deno/Tokio
Jsmv – Manipulate your file system using JavaScript
Write Redis Modules Using JavaScript
Funicular.js: Kinect to JavaScript Using WebSockets
Build ZigZag Game Using Cocos2d-X JavaScript
Promises in JavaScript
Javascript Keylogger