bin: adjust rd

This commit is contained in:
xeruf 2021-12-12 11:35:36 +01:00
parent 797e1fd2d8
commit 10536a6b1b
2 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
{
echo "$# Args: $@"
echo "$# Args: ${@:-DEFAULT}"
#echo "Starred: $*"
#echo "${@:-default}" | sed 's/\w\+/\0-w/g'
for last; do true; done

View File

@ -1,7 +1,7 @@
#!/bin/sh
# Remove recursively safely
case "$1" in ([0-9]) depth=$1; shift;; esac
for f in "$@"
for f in "${@-.}"
do
test -w "$f" && elevate="" || elevate=sudo
if test -d "$f"; then
@ -17,5 +17,4 @@ do
fi
else $elevate rm -i "$f"
fi
shift
done