Skip to content

Instantly share code, notes, and snippets.

@zafergurel
Created September 24, 2019 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zafergurel/ce61acf745acac873474425e0b92b32b to your computer and use it in GitHub Desktop.
Save zafergurel/ce61acf745acac873474425e0b92b32b to your computer and use it in GitHub Desktop.
A bash script that checks whether a folder is empty or not.
#!/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