* BAEL-3132 - Linux Commands - Loop Through Directories/Folders * BAEL-3132 - Linux Commands - Loop Through Directories/Folders - update pom description. * BAEL-3132 - Linux Commands - Loop Through Directories/Folders - Add another example using find exec. * BAEL-3132 - Linux Commands - Loop Through Directories/Folders
9 lines
191 B
Bash
Executable File
9 lines
191 B
Bash
Executable File
#!/bin/bash
|
|
|
|
find . -maxdepth 1 -mindepth 1 -type d -printf '%f\n'
|
|
|
|
find . -maxdepth 1 -mindepth 1 -type d | while read dir; do
|
|
echo "$dir"
|
|
done
|
|
|
|
find . -maxdepth 1 -type d -exec echo {} \; |