I’m using Mac OSX Lion and I would like to have a script that tells me if a directory is hidden or visible. the directory is .whatyoulookingatfool.
This is what I have now…
#!/bin/bash
#Check for dir
if test -d /Users/NSutton/Documents/.whatyoulookingatfool; then
echo "go go go"
else
echo "well shit"
fi
I don’t have any osx machine right here, but I assume that mac has a basename command and new enough bash.
Note that this does not work with
.and..directories.