Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • @Stéphane Chazelas Thank you very much for that edit. I was writing dirty, ignoring "proper" quoting as it's not needed in this case, but I am very grateful for the shortcuts! Commented May 18, 2015 at 13:51
  • I tried your bash solution. It's very nice; I like it a lot. It worked well for about 24 hours or so before I noticed my system was completely locked up. Tried something similar with `python; with a similar result, although it was considerably quicker. Commented Oct 4, 2016 at 20:57
  • How to do the C solution with multi-threading? Commented Jul 27, 2022 at 13:50
  • 1
    @dtrunk That's an interesting modification to the problem. You can use local buffers with a reentrant permute function, partition on the first written letter and do the rest with the permute function. You'll also want to use thread-local io buffers. I even get a slowdown in the multithreaded solution if I simply use puts, but with thread-local io buffers, the multithreaded approach is faster. pastebin.com/Pz5ivKE9 Commented Jul 27, 2022 at 16:17