diff --git a/README.md b/README.md index 830ffc5..1f2cc2f 100644 --- a/README.md +++ b/README.md @@ -4800,6 +4800,7 @@ Using the keyword read so for example read x will wait
Write a script to determine whether a host is up or down
+**EXAMPLE ONE** ``` #!/bin/bash SERVERIP= @@ -4817,6 +4818,21 @@ fi
Write a script to remove all the empty files in a given directory (also nested directories)
+ +**EXAMPLE ONE** +``` +#! /bin/bash +for x in * +do + if [ -s $x ] + then + continue + else + rm -rf $x + fi +done +``` +