removed needless tests and added an example using braces expansion to loop over files explicitly referenced

This commit is contained in:
Chris
2018-06-17 14:25:59 -04:00
parent f504d4618a
commit 920988deb0
2 changed files with 5 additions and 10 deletions

View File

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