I want to create a subset of a database. I.e. delete 500+ entries from a database.
I have the dump of entries I want to keep. How can I either
- import this dump into a new db (-mergedb needs a database), or
- delete everything else (without entering the password 500+ times)?
Answering myself - this worked:
$ cat tmp/pwsafe-* | sort | uniq -u | while read n ; do echo PASSWORD | pwsafe --delete "$n" ; done
(I had two files in tmp, one with all the entries, and one with those to keep. So delete all those we don't want to keep.)
Log in to post a comment.