Created
March 12, 2024 03:34
-
-
Save guitarrapc/06ca73a5e962bb74d2b978a7ac04b051 to your computer and use it in GitHub Desktop.
Enumerable files under
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
#!/bin/bash | |
set -e | |
extension="txt" | |
result=$(find . -type f -name "*.${extension}" | cut -d / -f 2 | sort -u) | |
if [[ -n "$result" ]]; then | |
while read -r item; do | |
echo "$PWD/$item" | |
done <<< "$result" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment