got this annoying error which i'm unable to figure out why its happening.
if [ cd "$EMPTY" ]
echo "dir exists"
echo "dir doesn't exist" 1>&2
i keep getting the following error:
./errorChecking.sh: line 5: [: cd: unary operator expected
i have also tried:
if [[ cd "$EMPTY" ]]