Last active
October 31, 2018 11:39
-
-
Save latpaw/2ff69e33ae4cc47ad2b2037f5659cebc to your computer and use it in GitHub Desktop.
some shell
This file contains 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
# show all latest commits in each branch | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
This file contains 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
# output the designated lines between 3 and 5 | |
sed -n '3,5p' some_file | |
# or | |
awk '{if(NR>2&&NR<6) print $0}' some_file | |
# | |
grep -C 1 4 some_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment