Files
Christopher 222e6af258 🔧 refactor: Use #!/usr/bin/env bash in all shell scripts (#16)
This commit refactors all the shell scripts to use `#!/usr/bin/env bash` instead of `#!/bin/bash`. This change ensures that the scripts will run with the system's default Bash interpreter, even if it is not located at the standard `/bin/bash` path.
2024-10-23 13:32:15 -05:00

18 lines
574 B
Bash

#!/usr/bin/env bash
# List all Docker volumes
echo "Here are all the available Docker volumes:"
docker volume ls --format '{{.Name}}'
# Provide a blank line for better readability
echo ""
# Prompt the user to enter a word associated with the volumes they want to remove
echo "Enter the keyword associated with the Docker volumes you want to remove:"
read word
# Use the word to filter and remove Docker volumes
docker volume ls --format '{{.Name}}' | grep "$word" | awk '{print $1}' | xargs -r docker volume rm
echo "Volumes associated with '$word' have been removed."