Skip to content

Instantly share code, notes, and snippets.

@nevergone
Created June 12, 2021 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nevergone/9ee0658427527b23f3f77c14dfd44072 to your computer and use it in GitHub Desktop.
Save nevergone/9ee0658427527b23f3f77c14dfd44072 to your computer and use it in GitHub Desktop.
sed regex with line insert
sed -i -re '/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com(.*)/a \1' sources.list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment