Skip to content

Instantly share code, notes, and snippets.

@delirehberi
Created March 9, 2021 14:03
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 delirehberi/83aa352b22fb9696d6f3022cb2db2ac2 to your computer and use it in GitHub Desktop.
Save delirehberi/83aa352b22fb9696d6f3022cb2db2ac2 to your computer and use it in GitHub Desktop.
Lastpass importer for passwordstore
#!/usr/bin/env bash
exec < ./lastpass_export.csv
read header
while IFS="," read -r url username password extra name grouping fav
do
ins="$password\n
---\n
url: $url\n
username: $username \n
password: $password \n
grouping: $grouping \n
name: $name \n
fav: $fav \n
extra: $extra"
name=$(php -r 'echo parse_url($argv[1],PHP_URL_HOST);' $url)
pass insert -m "$name/$username" < <(echo -e $ins)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment