13 lines
306 B
Bash
Executable File
13 lines
306 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Find and remove empty directories
|
|
#
|
|
|
|
# Find and process empty directories
|
|
TARGET_DIR="$DS918_DIR/video/#tvshow"
|
|
cd "$TARGET_DIR"
|
|
find . -maxdepth 1 -type d -empty -print0 | while IFS= read -r -d '' dir; do
|
|
echo "$dir to be removed"
|
|
rm -r "$dir" || echo "Failed to remove $dir"
|
|
done
|