I have this piece of code to match the folder name:
#!/bin/bash
for dir in teste/*
do
if [ "$dir" = 1 ]; then
echo "folder 1";
fi
if [ "$dir" = 2 ]; then
echo "folder 2";
fi
done
And I have a directory called teste/1/ and teste/2/ After running the script above, my output is nothing! There are no errors...
Do you know how to solve it? I don't know why this happens