Skip to content

Instantly share code, notes, and snippets.

@thiagosouza
Last active August 5, 2024 18:07
Show Gist options
  • Save thiagosouza/21fc30700c5031d7a9bdfd2f891122d9 to your computer and use it in GitHub Desktop.
Save thiagosouza/21fc30700c5031d7a9bdfd2f891122d9 to your computer and use it in GitHub Desktop.
[Bash / Terminal commands] #terminal #shell #bash
#https://en.wikipedia.org/wiki/Here_document#Unix_shells
for folder in `find . -type d -maxdepth 1 -mindepth 1 -not -name .svn`; do echo $folder exists here - do something with it; echo $folder | perl -pe 's/\.\///g '; done
cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g'
#0.7.5
cat package.json | jq -r '.version'
#"0.7.5"
npm pkg get version
#"0.7.5"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment