blackbox_shred_all_files: BUGFIX: Does not shred files with spaces.
This commit is contained in:
@@ -24,11 +24,12 @@ echo '========== FILES BEING SHREDDED:'
|
|||||||
|
|
||||||
exported_internal_shred_file() {
|
exported_internal_shred_file() {
|
||||||
source "$1/_blackbox_common.sh"
|
source "$1/_blackbox_common.sh"
|
||||||
unencrypted_file=$(get_unencrypted_filename "$2")
|
unencrypted_file="$2"
|
||||||
encrypted_file=$(get_encrypted_filename "$unencrypted_file")
|
|
||||||
if [[ -f "$unencrypted_file" ]]; then
|
if [[ -f "$unencrypted_file" ]]; then
|
||||||
echo " $unencrypted_file"
|
echo " SHRED: $unencrypted_file"
|
||||||
shred_file "$unencrypted_file"
|
shred_file "$unencrypted_file"
|
||||||
|
else
|
||||||
|
echo "NOT FOUND: $unencrypted_file"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,6 +39,6 @@ DEREFERENCED_BIN_DIR="${0%/*}"
|
|||||||
MAX_PARALLEL_SHRED=10
|
MAX_PARALLEL_SHRED=10
|
||||||
|
|
||||||
export IFS=
|
export IFS=
|
||||||
xargs -I{} -n 1 -P $MAX_PARALLEL_SHRED bash -c "exported_internal_shred_file $DEREFERENCED_BIN_DIR {}" $DEREFERENCED_BIN_DIR/fake <"$BB_FILES"
|
tr '\n' '\0' <"$BB_FILES" | xargs -0 -I{} -n 1 -P $MAX_PARALLEL_SHRED bash -c "exported_internal_shred_file $DEREFERENCED_BIN_DIR \"{}\"" $DEREFERENCED_BIN_DIR/fake
|
||||||
|
|
||||||
echo '========== DONE.'
|
echo '========== DONE.'
|
||||||
|
|||||||
Reference in New Issue
Block a user