


Substitute your own values as necessary lsĭirFive/ dirfour/ dirone/ dirthree/ cat /home/xieerqi/makeDirs.py
PERL MKDIR FULL
Note that in the example bellow, /home/xieerqi/dirList.txt is the full path given to my file, and we make up full path of each new directory by joining string /home/username/ and the dir name read from list. Pythonic way of doing the same, would be to read each line, get rid of trailing \n, shove everything into one list, and iterate over the list items and create dirs per list item. Jei praleistas, MASK pagal nutyljim yra 0777. Skms atveju graina true, kitu atveju - false ir nustato (errno). Or you could remove, with gsub() function, and call system("mkdir "$0) but that may be a problem if you want to create directories with spaces in their name Sukuria direktorij, pateikt FILENAME, su leidimais, pateiktais MASK (kaip umask). rw-rw-r- 1 xieerqi xieerqi 23 Feb 9 11:41 dirList.txtĭrwxrwxr-x 2 xieerqi xieerqi 4096 Feb 9 11:42 dirone/ĭrwxrwxr-x 2 xieerqi xieerqi 4096 Feb 9 11:42 dirthree/ĭrwxrwxr-x 2 xieerqi xieerqi 4096 Feb 9 11:42 cat dirList.txt i have Figured this out, i will leave the answer to this as it was not related to Perl but apache user, I added the www 'the apache user' user to a group that had access to the folder, this allowed it to read and write to the folder, so please not forget if you are trying to mkdir make sure you have access to it. mkdir $( tr '' ' ' < /home/xieerqi/dirList.txt lsĭirFive/ dirfour/ dirone/ dirthree/ dirtwo/ĪWK is a text processing language, but it has very nice system() function which will call the default shell, and run command enclosed in parenthesis ( which must be a string). Since everybody is posting oneliners, here's mine as well ( mkdir + parameter substitution plus + shell redirection ).

So you want comma separated list of directory names ? That can be done.
