- Cut 3 symbols from the string:
1# last 3 symbols
2sed 's/...$//' # the number of dots corresponds to the number of symbols
3 # you wanna cut out
4# initial 3 symbols
5sed 's/^...//'
- Output all strings after the match "Key" (including the one with "Key"):
1sed -n '/Key/,$p'
- Copy commits from one branch to another
1git branch new
2git cherry-pick oldest^..newest