Skip to content

Instantly share code, notes, and snippets.

@n2p5
Last active December 14, 2016 06:38
Show Gist options
  • Save n2p5/a31251a8353b6120f1f7b131732648d6 to your computer and use it in GitHub Desktop.
Save n2p5/a31251a8353b6120f1f7b131732648d6 to your computer and use it in GitHub Desktop.
grab version number from package.json in the bash shell
# grab the version number from package.json
awk '/version/{ gsub(/"|[",]/,""); print $2; exit;}' package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment