Make user get prompted if extracted file overwrites another file

This commit is contained in:
krisdoodle45 2021-10-07 09:59:14 +02:00 committed by GitHub
parent d84804d781
commit f7fad2bd24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ esac done
[ -z "$archives" ] && printf "Give archives to extract as argument.\\n" && exit 1
while IFS= read -r file ; do
while IFS= read -r file <&3; do
if [ -f "$file" ] ; then
if [ -z "$extracthere" ]; then
directory="$(echo "$file" | sed 's/\.[^\/.]*$//')" &&
@ -42,4 +42,4 @@ while IFS= read -r file ; do
else
printf "File \"%s\" not found.\\n" "$file"
fi
done <<< "$archives"
done 3<<< "$archives"