Merge pull request #13 from paxperscientiam/brace-expansion

Brace expansion
This commit is contained in:
Dylan Araps 2018-06-18 10:50:24 +10:00 committed by GitHub
commit 15941d9930
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -748,6 +748,11 @@ for dir in ~/Downloads/*/; do
printf '%s\n' "$dir"
done
# Leverage brace expansion to loop, explicit reference
for file in /path/to/parentdir/{file1,file2,subdir/file3}; do
printf '%s\n' "$file"
done
# Iterate recursively.
shopt -s globstar
for file in ~/Pictures/**/*; do