This commit is contained in:
devender.kumar
2019-10-30 23:16:56 +01:00
parent db85c8f275
commit fb34b40870
20538 changed files with 1642819 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
### Relevant Articles:
- [Linux Commands Looping Through Directories](https://www.baeldung.com/linux/loop-directories)
+9
View File
@@ -0,0 +1,9 @@
#!/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 {} \;
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
for dir in */; do
echo "$dir"
done
for file in *; do
if [ -d "$file" ]; then
echo "$file"
fi
done