Devops-Practical-Problem-8
Practical Problem: Suppose if you have multiple files in a server, and you want to check whether files are empty or not.How will you check this ? Solution: #!/bin/bash for j in $(cat file-name.txt) do b=`ssh hostname cat $j | wc -l` if [ "$b" == "0" ] then echo "File is empty" else echo "File is not empty" fi done For more practical problems Please click on below link: URL: https://payhip.com/b/247HD https://rzp.io/l/jpiSs3L