#!/bin/bash
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
