diff --git a/bin/blackbox_cat b/bin/blackbox_cat index 141399d..e8893be 100755 --- a/bin/blackbox_cat +++ b/bin/blackbox_cat @@ -7,8 +7,14 @@ set -e . _blackbox_common.sh for param in """$@""" ; do + shreddable=0 unencrypted_file=$(get_unencrypted_filename "$param") - blackbox_edit_start "$param" - cat $unencrypted_file - shred_file "$unencrypted_file" + if [[ ! -e "$unencrypted_file" ]]; then + blackbox_edit_start "$param" + shreddable=1 + fi + cat "$unencrypted_file" + if [[ $shreddable = 1 ]]; then + shred_file "$unencrypted_file" + fi done