Skip to content

Instantly share code, notes, and snippets.

@BonyChops
Last active July 7, 2021 17:39
Show Gist options
  • Save BonyChops/734d9c9a2f680fcfdab2afd43790342d to your computer and use it in GitHub Desktop.
Save BonyChops/734d9c9a2f680fcfdab2afd43790342d to your computer and use it in GitHub Desktop.
Search for directory which is NOT a repository of git
#!/bin/sh
dirs=`find * -maxdepth 0 -type d `
for dir in $dirs;
do
if [ ! -d "$dir/.git" ]; then
echo $dir
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment