I have a folder which contains some folders, these folder are moved very often so I made a script to see if they exist, and if not then create them. This is what I did to (which I though would) achieve it:
if [ ! -f "$DIR/0folder" ] then mkdir "$DIR/0folder" fi
But, even if
0folder already exists, it still tries to make it which
mkdir tells me. Like here;
mkdir: /Allfoldersgoeshere/subfolder/0folder: File exists
Why? It should just ignore it because it already exists?