Created
February 7, 2020 23:36
-
-
Save webcoyote/24525299fad968a2a1aad5ca000f9f7f to your computer and use it in GitHub Desktop.
Bash script to aggregate files into an array for use in a command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
declare -a LIBS | |
while IFS= read -rd $'\0' LIB; do | |
LIBS+=("$LIB") | |
done < <(find "$SCRIPT_DIR/bin" -type f -iname '*.dll' -print0) | |
echo "Count: ${#LIBS[@]}" | |
echo "${LIBS[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment