Created
August 11, 2017 15:47
-
-
Save catdad/6bf1069e76b164bb8677b4a13db9bee3 to your computer and use it in GitHub Desktop.
Use node to parse some json from a bash script
This file contains hidden or 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
BUILD_NUMBER=`node <<- EOM | |
var fs = require('fs'); | |
var file = JSON.parse(fs.readFileSync('./file.json', 'utf8')); | |
process.stdout.write(file.displayName); | |
EOM` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment