Horje
bash test empty directory Code Example
bash test empty directory
#!/bin/bash

DIR="/empty_dir"

# look for empty dir 
if [ "$(ls -A $DIR)" ]; then
     echo "Take action $DIR is not Empty"
else
    echo "$DIR is Empty"
fi




Cpp

Related
C++ Swap Function Code Example C++ Swap Function Code Example
c++ arrray Code Example c++ arrray Code Example
c++ string contains Code Example c++ string contains Code Example
c++ cast to type of variable Code Example c++ cast to type of variable Code Example
how to return char* from function in c++ Code Example how to return char* from function in c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7