These machines have no common sense; they have not yet learned to 'think,' and they do exactly as they are told, no more and no less. This fact is the hardest concept to grasp when one first tries to use a computer.
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!
Education Sponsors
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!
Advised to run only with smaller sets :)
Power-set
Not a good solution but just trying to do it with pipelines alone.
cat A |xargs -n 1 ksh -c 'cat A |xargs |sed -e "s; ;,;g" -e "s;.*;{&};g" '|xargs|sed -e 's; ;\\\\\\\ ;g'|xargs -I{} ksh -c 'echo {}' > tmpcat tmp |xargs -n 3 |cat |xargs -I{} ksh -c 'echo {} |xargs -n 1 |sort -u |xargs ' |sort -u$ cat A |xargs -I{} -n 1 sh -c 'cat N |xargs -n1 echo {} ' a 1 a 2 a 3 b 1 b 2 b 3 c 1 c 2 c 3Power set:
$ cat A | xargs -n 1 ksh -c 'cat A |xargs |sed -e "s; ;,;g" -e "s;.*;{&};g" ' | xargs |sed -e 's; ;\\\\\\\ ;g'|xargs -I{} ksh -c 'echo {}'| xargs -n `wc -l <A` | xargs -I{} sh -c 'echo {}|xargs -n 1|sort -u|xargs ' | sort -uOutput:
Reply To This Comment