Schlauer:
bearbeitet von RaketenwilliAlso bei echten Geheimnisse würde ich mich viel mehr als auf „Verstecken“ auf
- [cryptsetup](https://www.cyberciti.biz/security/howto-linux-hard-disk-encryption-with-luks-cryptsetup-command/)
- [ecryptfs](https://wiki.ubuntuusers.de/ecryptfs/)
- Alternativ oder zusätzlich: [ccrypt](https://ccrypt.sourceforge.net/)
verlassen.
(Hier das mir fehlende `ccless`):
~~~BASH
#!/bin/bash
# ccless - open encrypted text-file and present the text in less
set +x;
if [ ! -f $1 ]; then
ccFile="${1}.cpt";
else
ccFile=${1};
fi
if [ -f "${ccFile}" ]; then
pw='';
read -s -p 'Passwort:' pw;
if [ "" != "${pw}" ]; then
echo "${pw}" | /usr/bin/ccat -k - -- "${ccFile}" | /usr/bin/less -KL --;
fi
clear;
exit 0;
else
read -t 2 -p "Fehler: Die Datei \"${1}\" wurde nicht gefunden. [Enter]" dummy;
clear;
exit 1;
fi
~~~