c - Sort words and then the sentence including digits and characters in Shell scripting or perl scripting -


I have a string "heya64 is21 a good89 day91"

I have to solve in such a way that, before each word has to be resolved, it is 46 and then these words should be resolved with other words. Then the result should be similar to the following,

"12is 1 9ady 46aehy 89dgoo a hist"

Can you please tell me how to do this If there is no least good algorithm in scripting, bash or pearl,

solve this problem The algorithm is simple to do, as you said in the description of your question, make the sort characters in each word first, then sort these sorted words again.

Like this:

  $ echo heya64 this is21 a good 9 9 days 1 9 | () "126 9 46 46 Ahahi 89dgoo a hist    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -