When sourcing the current hackshell in MnajaroLinux environment, an error occurs when parsing the shred() function.
[UserName@localhost ~]% source <(curl -SsfL https://thc.org/hs)
bash: /dev/fd/63: line 187: syntax error near unexpected token `('
bash: /dev/fd/63: line 187: `command -v shred >/dev/null || shred() {'
I fixed line 187
# SHRED without shred command
custom_shred() {
[[ -z $1 || ! -f "$1" ]] && { echo >&2 "shred [FILE]"; return 255; }
dd status=none bs=1k count=$(du -sk "${1:?}" | cut -f1) if=/dev/urandom of="$1"
rm -f "${1:?}"
}
if ! command -v shred >/dev/null; then
alias shred='custom_shred'
fi
In this pull request, we aim to change the judgment using an OR expression to an if statement and reapply the shred command using an alias (if the shred command binary does not exist). At least it worked in my ManjaroLinux as Blackarch environment.
If you have any questions, we are always available.
When sourcing the current hackshell in MnajaroLinux environment, an error occurs when parsing the shred() function.
I fixed line 187
In this pull request, we aim to change the judgment using an OR expression to an if statement and reapply the shred command using an alias (if the shred command binary does not exist). At least it worked in my ManjaroLinux as Blackarch environment.
If you have any questions, we are always available.