for gifguide2code: many folders in 2 more languages

gifguide2code is one of my first subscribers; i enjoy the intros and they encourage me to make more of my own (i would like to start posting my “figtools” although most are written for pipelines in gnu/linux.)

todays intro is “how to make [a lot] of files.” gifguide uses autohotkey; i will use a fig example for windows and /linux, and another example for bash:

# public domain

folders = 200

fs = folders    str
fn = "Folders1_"    plus fs

now = "mkdir "    plus fn    shell
now = fn    chdir

for f (1, folders, 1)
    foldern = f    str
    now = "mkdir "    plus foldern    shell


bash has more finicky syntax, but lets you do it in one line:

f=200 ; mkdir Folders1_$f ; for p in $(seq 1 $f) ; do mkdir Folders1_$f/$p ; done # public domain



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s