Skip to content

Instantly share code, notes, and snippets.

@salkin-mada
Created June 29, 2021 12:49
Show Gist options
  • Save salkin-mada/3056c6bfb7fc7417373fe43824a8ab2b to your computer and use it in GitHub Desktop.
Save salkin-mada/3056c6bfb7fc7417373fe43824a8ab2b to your computer and use it in GitHub Desktop.
sed stuff
alias sed-get-between-comments='sed -n "/\/\//,/\/\//{/\/\//b;/\/\//b;p}"'
function sed-get-between-duplicate() {
sed -n '/'$1'/,/'$1'/{/'$1'/b;/'$1'/b;p}' $2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment