Skip to content

Instantly share code, notes, and snippets.

View kizmo04's full-sized avatar
🎯
Focusing

Joonmo Kim kizmo04

🎯
Focusing
View GitHub Profile
@kizmo04
kizmo04 / get-npm-package-version
Created March 30, 2022 04:33 — forked from DarrenN/get-npm-package-version
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION