You're viewing a comment by Wenslayer and its responses.
You're viewing a comment by Wenslayer and its responses.
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
I am being sponsored by A-Writer! If you ever need help with essay writing, look no further than A-Writer! They will help you with your writing in as quickly as 3 hours!
I love to read science books. They make my day and I get ideas for awesome blog posts, such as Busy Beaver, On Functors, Recursive Regular Expressions and many others.
Take a look at my
Amazon wish list, if you're curious about what I have planned reading next, and want to surprise me. :)
If you are interested in advertising on catonmat.net, contact me.
Free tools for coding on Vietstarsoft.com.
Programming homework help.


Here's my take on power set without resorting to a scripting language:
(echo -e "echo \c"; for set in set1 set2 set3; do echo -e "{`sort -u $set|xargs|tr ' ' ','`,}\c"; done)|bash -|xargs -n1For example, here are three files representing different sets:
And here's the power set of them:
$ (echo -e "echo \c"; for set in set1 set2 set3; do echo -e "{`sort -u $set|xargs|tr ' ' ','`,}\c"; done) | bash -s | xargs -n1 a am amx amy an anx any ax ay b bm bmx bmy bn bnx bny bx by m mx my n nx ny x yCheers!
Comment Responses
Whoops, could make it easier by using
eval:$ eval $(echo -e "echo \c"; for set in set1 set2 set3; do echo -e "{`sort -u $set|xargs|tr ' ' ','`,}\c"; done)|xargs -n1Reply To This Comment