From 012324796977162d0d9d83686acacb9a3a2482c6 Mon Sep 17 00:00:00 2001 From: vincent Date: Tue, 26 Jan 2021 18:33:44 +0100 Subject: [PATCH] add example --- IT/linux/shell.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/IT/linux/shell.md b/IT/linux/shell.md index e5cd252..1848264 100644 --- a/IT/linux/shell.md +++ b/IT/linux/shell.md @@ -56,3 +56,14 @@ fi |-r -w -x | test permition| |$a -nt $b| $a plus récent| |$a -ot $b| $a plus vieux| + +## Supprimer les Dossiers contenant 1 élement + +``` +IFS=$'\n';for i in $(ls) do  ✔  10022  18:29:32  + if [ $(ls $i|wc|awk '{print $1}') = 1 ] +then +rm -r $i +fi + +```