Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Create multiple folders from Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create multiple folders from Terminal
Authored by: juanfal on Apr 25, '06 10:49:05AM
perl, perl, what a nightmare.. !!!! You should use
   perl -ne 'chomp($x=$_); mkdir($x);' < dirnames.txt
and the utf8 accented etc chars are not welcome :(

[ Reply to This | # ]
Create multiple folders from Terminal
Authored by: kitzkikz on Apr 27, '06 04:11:33PM
There's no need for the chomp if you use the lowercase L switch. There's no need for the parens, semicolon, or redirection either.
perl -lne 'mkdir $_' dirnames.txt


[ Reply to This | # ]