Skip to content

Instantly share code, notes, and snippets.

@kave
Created April 15, 2019 17: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 kave/35f7f2f6dfbcd0ec39216f4c52711187 to your computer and use it in GitHub Desktop.
Save kave/35f7f2f6dfbcd0ec39216f4c52711187 to your computer and use it in GitHub Desktop.
Export Secret Notes out of Last Pass
# This will list all the secret notes in the folder `dev` and export them into the local directory `dev`
# Protip if your doing this on a mac, you'll need th gnu version of sed `brew install gnu-sed`
lpass ls "<folder_name>" | sed -n "s/^.*\/\s*\(.*\)\[.*$/\1/p" | xargs -i bash -c "lpass show --note {} > <folder_name>/{}"
lpass ls "dev" | sed -n "s/^.*\/\s*\(.*\)\[.*$/\1/p" | xargs -i bash -c "lpass show --note {} > dev/{}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment