add clean_images.sh

This commit is contained in:
2023-07-16 19:53:41 +01:00
parent 5a2b2e7a85
commit 9f3d4a44c8

7
clean_images.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# script for looping through each image in a directory, displaying it with pqiv, and upon the closing of the image viewer, asking the user whether or not to delete the image, and deleting if "y" received
for file in *
do
pqiv "$file" || rm "$file" && read -p "Delete file? [y/n]: " ans && [ "$ans" = "y" ] && rm "$file"
done