cat savepw.py
import crypt
import sys
print sys.argv[1]
print crypt.crypt(sys.argv[1])
-------------------------------------
use in bash
savepw=($(python savepw.py 'password'))
echo "save password : " $savepw
use in bash
savepw=($(python savepw.py 'password'))
echo "save password : " $savepw