Last active
August 5, 2024 18:07
-
-
Save thiagosouza/21fc30700c5031d7a9bdfd2f891122d9 to your computer and use it in GitHub Desktop.
[Bash / Terminal commands] #terminal #shell #bash
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
#https://en.wikipedia.org/wiki/Here_document#Unix_shells |
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
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 |
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
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" |
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
:w !sudo tee % |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment