You don’t need all those password manager software and applications for text files encryption/protection. It is very easy in linux or in mac.
Put your rarely and tough passwords in a text file then encrypt it. Anyway it’s bad idea not because of encryption but because you may open it while someone is around and he sees all your password. Encryption is DES which is considered good so don’t worry about encrypted thing.
Now if you have a file named text.txt and you want to encrytpt it simply run following command in terminal.

openssl des3 -salt -in text.txt -out text_encrypted

This will ask you for a password two times last one is for confirmation. That’s all your file is password protected. Now you can safely delete your text.txt.
For decrypting the command is

openssl des3 -d -in text_encrypted

oho! everything inside the encrypted file is decrypted and printed on terminal(std output). You can even specify the out file name but then you have to delete the file after you have read it in plain text. If you forget to delete or leave the terminal open while you have use it for displayingūüė¶ sad anyone can see it now. So, use this thing with caution.
For creating the file back( for putting things in a file and not on std output)
type this in terminal:
openssl des3 -d -in text_encrypted -out text.txt

Here is a simple bash script which will do all this with one command and is user friendly way.

#!/bin/bash
#for locking
echo “Enter file to encrypt”
read “in_file”
out_file=`basename “$in_file”`
out_file=”$out_file.encrypt”
echo encrypted file will be: $out_file
openssl des3 -salt -in “$in_file” -out “$out_file”
echo “Do you want to delete original file y/n?”
read “resp”
true=”y”
if [ “$resp” = “$true” ]; then
rm “$in_file”
fi

For unlocking:
#!/bin/bash
#for unlocking
echo “Enter file to decrypt”
read “in_file”
echo “Do you want to write the output on std out(y) or in file(n) enter y/n”
read “resp”
true=”y”
if [ “$resp” != “$true” ]; then
out_file=`basename “$in_file”`
openssl des3 -d -in “$in_file” -out “$out_file.unecrypted”
echo “Remember to delete the unencrypted file afterward”
else
openssl des3 -d -in “$in_file”
fi