In order to manage all my secret passwords I wrote myself a small bash/awk script which manages a database file using encryption of GnuPG. (Source of pwgrep v0.2)
The database file is divided in several records. Each record begins with its name followed by several lines holding all the secret informations. The (actually very simple) format of the database file is as follows:
some record name here
after a tabulator some secret informations
more secret informations
another record name here .....
secret username: foo
secret password is bla
you can write as many secret infos as you wish
.
.
secret stuff
password: hello world
username: mr. universe
The database is not stored in plain text. It is encrypted using GnuPG (database.gpg).
I can only search for the record names of a database file. For example if I want to see my secret username and password which is stored in the database.gpg file it will look like this:

After entering the password of my secret GnuPG key I will receive the informations requested:

pwgrep will print out automatically all records matching my search string. Not only the first one it finds.
I can use pwedit for the case I want to add something to the database or just to edit/delete something of the current database:


After editing, pwgrep will automatically wipe all temporally files securely and it will commit the new version into the versioning system (In this case subversion is being used. But others can be configured as well). pwgrep is using Vim (with swapping and backuping disabled) in order to edit the database file. If you want to use a different editor, you should make sure NOT to produce temporally files. If you produce temporally files, at least they should get wiped securely from the hard disk.


If you want to look up your secret ebay stuff, just search for it with
pwgrep ebay
If found, pwgrep uses destroy or shred for wiping files. If none of those commands are found, pwgrep checks if the current operating system is FreeBSD. In this case, rm -P can be used as well. Otherwise an error will occur.
Update: Uploaded v0.2 of pwgrep. Before editing the newest version will be checked out before. This will avoid versioning conflicts. The tool also creates local snapshot files of the encypted database (for the case you lost internet connection and you want to roll back to the previous version) And a few other enhancements have been built in.