added del pic script
This commit is contained in:
parent
51e2f79e24
commit
929e2d330b
18
.local/share/scripts/del-pic.sh
Executable file
18
.local/share/scripts/del-pic.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
DIR=${1:-$("pwd")}
|
||||
SELECT=$(sxiv -N "floatme" -t -o "$DIR")
|
||||
|
||||
[[ -z "$SELECT" ]] && exit 0
|
||||
|
||||
COUNT=$(echo "$SELECT" | wc -l)
|
||||
|
||||
read -p "Remove these $COUNT item(s)? " -n 1 -r
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
while read -r line; do
|
||||
rm $line
|
||||
done <<< "$SELECT"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user