shell-safe-rm
shell-safe-rm copied to clipboard
Error in filenames with more than 2 spaces (1.0.7)
Thank you for a great program!
I've been using it for a while, however I got an error today for a filename with more than two spaces:
touch "a b c"
./rm.sh "a b c"
basename: extra operand βcβ
Try 'basename --help' for more information.
basename: extra operand βcβ
Try 'basename --help' for more information.
The program appears to do the right thing, as the file is removed and seemingly correctly placed in the trash.
Note that there is no error for a filename with 1 space:
touch "a b"
./rm.sh "a b"
System configuration:
alias rm='/nix/store/16m5g0j6rc9fx3rxhxbwzs4sy07abyd5-shell-safe-rm-1.0.7/bin/rm.sh'
GNU bash, version 5.1.8(1)-release (x86_64-pc-linux-gnu)
Linux xxx 5.10.101 #1-NixOS SMP Wed Feb 16 11:54:31 UTC 2022 x86_64 GNU/Linux
I am having the same problem.
[snowman@asus ~/Downloads] rm -rf All\ About\ The\ Benjamins\ \(2002\)
basename: extra operand βTheβ
Try 'basename --help' for more information.
basename: extra operand βTheβ
Try 'basename --help' for more information.
System Details
Linux asus 5.18.0-artix1-1 #1 SMP PREEMPT_DYNAMIC Thu, 26 May 2022 13:26:58 +0000 x86_64 GNU/Linux
My basename version is
basename (GNU coreutils) 9.1
Command executed on Tue May 31 07:35:24 PM SAST 2022