Created
September 24, 2019 08:10
-
-
Save zafergurel/ce61acf745acac873474425e0b92b32b to your computer and use it in GitHub Desktop.
A bash script that checks whether a folder is empty or not.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if find $1 -maxdepth 0 -empty | read v; then echo 1; else echo 0 ; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment