Forked from fhuitelec/check_if_array_is_empty.zsh
Created
September 15, 2023 22:38
-
-
Save nfekete/be9299afa3b69995d26f91a8524caf68 to your computer and use it in GitHub Desktop.
[Check if array is empty] #zsh #shell #cheatsheet
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 zsh | |
# | |
# Check if array is empty | |
# | |
typeset -A knock_sequences | |
if [ ${#knock_sequences[@]} -eq 0 ]; then | |
echo "No knock sequence found." | |
exit 0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment