Created
April 20, 2020 08:01
-
-
Save jakub-g/b489ff59a92198b9b5a83f78d7d89e34 to your computer and use it in GitHub Desktop.
Use nodejs in bash script for string manipulation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo "FOO_BAR" | node -p 'require("fs").readFileSync(process.stdin.fd, "utf-8").replace("_", "..")' | |
FOO..BAR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment