Search
 
SCRIPT & CODE EXAMPLE
 

CPP

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
Comment

PREVIOUS NEXT
Code Example
Cpp :: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. 
Cpp :: reverse c++ string 
Cpp :: min vector c++ 
Cpp :: read file into vector 
Cpp :: c++ looping 
Cpp :: counting sort c++ 
Cpp :: how to compare lower case character to uppercase cpp 
Cpp :: input 2d vector c++ 
Cpp :: c++ vector sort 
Cpp :: strip space from string cpp 
Cpp :: chrono library c++ 
Cpp :: how to round to nearest whole number unity 
Cpp :: change to lowercase character c++ 
Cpp :: for loop with array c++ 
Cpp :: Heap pinter c++ 
Cpp :: read text from file c++ 
Cpp :: how to change a value from an array c++ 
Cpp :: cpp create multidimensional vector 
Cpp :: c++ get type name 
Cpp :: cpp std list example 
Cpp :: play audio c++ 
Cpp :: iterate vector in reverse c++ 
Cpp :: matrix in vector c++ 
Cpp :: naive pattern matching algorithm 
Cpp :: c++ vector push if not exist 
Cpp :: c++ string size 
Cpp :: c++ logger class example 
Cpp :: 3d projection onto 2d plane algorithm 
Cpp :: function in c++ 
Cpp :: sort array c++ 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =