From f6be60886dd5250b7569daeeb74a56410b61500c Mon Sep 17 00:00:00 2001 From: bonnie Date: Sun, 19 Jul 2020 22:45:24 +0800 Subject: [PATCH] Condition and loop - Make directories listed in a file --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 68af0fc..43762a0 100644 --- a/README.md +++ b/README.md @@ -1028,10 +1028,14 @@ if [[ $age -gt 21 ]] ##### For loop ```bash +# Echo the file name under the current directory for i in $(ls); do echo file $i;done #or for i in *; do echo file $i; done +# Make directories listed in a file (e.g. myfile) +for dir in $(