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: jaysoffian on Apr 26, '06 09:45:30PM
Ah, just realized you set the encoding in TextEdit when you save. In that case, select "UTF-8" and just use:

python -c 'import sys,os;[os.mkdir(d) for d in open(sys.argv[1])]' names.txt
Oddly, if you re-open that that file TextEdit, it improperly decodes it as MacRoman. Oh well.

[ Reply to This | # ]
Create multiple folders from Terminal
Authored by: jaysoffian on Apr 26, '06 09:48:36PM

Okay, I win the award for replies to self. :-)

TextEdit -> Preferences -> Open and Save -> Plain text file encoding.

I had both opening/saving set to Automatic. Setting to UTF-8 does the right thing.

j.



[ Reply to This | # ]