You're viewing a comment by Patrick Farrell and its responses.

April 05, 2010, 13:14

I accidentally left this comment under the wrong article :). Posting it here too, (sorry Peter, I'd delete the other one if I could).

Reading this post, I realized you could use the set expansion stuff for a rudimentary calculator. I'm not arguing this is a _good_ tool, it just works, for natural numbers.

For instance, 3*5
$ echo {1,2,3}{1,2,3,4,5} | wc -w

Also, here's a way you can print every number from 1 to 99 (I won't print the output, you can try it on your own).

$ echo {,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "server_195": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.