dotfiles/.config/polybar/scripts/move_sh_files.sh
2024-01-29 08:31:23 -06:00

17 lines
354 B
Bash
Executable File

#!/bin/bash
# Loop through each subdirectory
for dir in */; do
# Navigate into the subdirectory
cd "$dir" || continue
# Find all .sh files and move them to the parent directory
find . -type f -name "*.sh" -exec mv {} .. \;
# Delete all other files and directories
rm -rf *
# Go back to the parent directory
cd ..
done