Originally Posted by fritz001
Now it's correct
No it isn't. It may look syntactically correct but I still wouldn't ever use it like that because of 0) expanding in this "for" loop versus 'while|read' (try expanding a ludicrous amount of items), 1) lack of proper quoting (spaces), 2) duplicated commands (mkdir --mode), 3) the octal mode in the chmod command (this would render any directories created inaccessable) and 4) not rooting it in the directory the directories should be created in. Sure, that was not a requirement and most of this may seem like nitpicking but scripting often isn't only listing commands but also taking into account proper error handling...