Skip to content

Instantly share code, notes, and snippets.

@MCMaurer
Last active November 1, 2018 16:46
Show Gist options
  • Save MCMaurer/b7622f2d8f20a3c1eef7764f0fc06f2f to your computer and use it in GitHub Desktop.
Save MCMaurer/b7622f2d8f20a3c1eef7764f0fc06f2f to your computer and use it in GitHub Desktop.
used this to look through an RMarkdown website repo to find all libraries used, and then write their names to a file so you can install them all. Just navigate to the repo and run this
grep -horE 'library\(.*?\)' . | sed 's/library//g; s/[()]//g; s/\'//g; s/"//g' | grep -Eo '^\w+' | sort | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment