Skip to content

Instantly share code, notes, and snippets.

@liuliqiang liuliqiang/ forked from haisum/
Created Dec 11, 2018

What would you like to do?
comment and uncomment lines in bash script via sed
sed -i '/<pattern>/s/^/#/g' file #comment
sed -i '/<pattern>/s/^#//g' file #uncomment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.