On Wednesday 10 June 2009 21:06:06 Karl Vogel wrote:
> Create 256 folders named 00-ff:
>
>        #!/bin/sh
>        hex='0 1 2 3 4 5 6 7 8 9 a b c d e f'
>        for x in $hex ; do
>            for y in $hex ; do
>                mkdir ${x}${y}
>            done
>        done
>        exit 0

Or use jot(1) instead of two for loops:

for i in `jot -w %02x 256 0`; do mkdir $i; done

To see the output of the jot in a readable format:

jot -w %02x 256 0 | rs 0 16

Jonathan
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to