Created
March 9, 2021 14:03
-
-
Save delirehberi/83aa352b22fb9696d6f3022cb2db2ac2 to your computer and use it in GitHub Desktop.
Lastpass importer for passwordstore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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