How can I sort a text file from number of occupied lines?












0














How could I sort a text files from number of ocupied lines?



From:



`He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



"Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside."
"Why not?" asked the prince.



The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."



Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid.
The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



pretending to be quite friendly. "Sit down and rest."
She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.´



To:



´After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.



pretending to be quite friendly. "Sit down and rest."
She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid.
The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



"Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside."
"Why not?" asked the prince.



He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."´










share|improve this question


















  • 2




    When I copy and paste your text then I get 6 lines, some of which are very long. So the question can be rephrased to "How do I sort lines by their length?", or do I miss something? Please also consider that 300 times the letter l may occupy fewer lines than 200 times the letter m when a proportional font is used.
    – PerlDuck
    Dec 27 at 17:59






  • 1




    See: stackoverflow.com/questions/5917576/…
    – Terrance
    Dec 27 at 18:26
















0














How could I sort a text files from number of ocupied lines?



From:



`He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



"Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside."
"Why not?" asked the prince.



The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."



Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid.
The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



pretending to be quite friendly. "Sit down and rest."
She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.´



To:



´After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.



pretending to be quite friendly. "Sit down and rest."
She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid.
The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



"Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside."
"Why not?" asked the prince.



He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."´










share|improve this question


















  • 2




    When I copy and paste your text then I get 6 lines, some of which are very long. So the question can be rephrased to "How do I sort lines by their length?", or do I miss something? Please also consider that 300 times the letter l may occupy fewer lines than 200 times the letter m when a proportional font is used.
    – PerlDuck
    Dec 27 at 17:59






  • 1




    See: stackoverflow.com/questions/5917576/…
    – Terrance
    Dec 27 at 18:26














0












0








0







How could I sort a text files from number of ocupied lines?



From:



`He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



"Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside."
"Why not?" asked the prince.



The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."



Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid.
The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



pretending to be quite friendly. "Sit down and rest."
She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.´



To:



´After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.



pretending to be quite friendly. "Sit down and rest."
She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid.
The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



"Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside."
"Why not?" asked the prince.



He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."´










share|improve this question













How could I sort a text files from number of ocupied lines?



From:



`He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



"Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside."
"Why not?" asked the prince.



The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."



Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid.
The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



pretending to be quite friendly. "Sit down and rest."
She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.´



To:



´After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.



pretending to be quite friendly. "Sit down and rest."
She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid.
The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



"Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside."
"Why not?" asked the prince.



He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."´







text sort






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 27 at 17:46









Araujo1914

665




665








  • 2




    When I copy and paste your text then I get 6 lines, some of which are very long. So the question can be rephrased to "How do I sort lines by their length?", or do I miss something? Please also consider that 300 times the letter l may occupy fewer lines than 200 times the letter m when a proportional font is used.
    – PerlDuck
    Dec 27 at 17:59






  • 1




    See: stackoverflow.com/questions/5917576/…
    – Terrance
    Dec 27 at 18:26














  • 2




    When I copy and paste your text then I get 6 lines, some of which are very long. So the question can be rephrased to "How do I sort lines by their length?", or do I miss something? Please also consider that 300 times the letter l may occupy fewer lines than 200 times the letter m when a proportional font is used.
    – PerlDuck
    Dec 27 at 17:59






  • 1




    See: stackoverflow.com/questions/5917576/…
    – Terrance
    Dec 27 at 18:26








2




2




When I copy and paste your text then I get 6 lines, some of which are very long. So the question can be rephrased to "How do I sort lines by their length?", or do I miss something? Please also consider that 300 times the letter l may occupy fewer lines than 200 times the letter m when a proportional font is used.
– PerlDuck
Dec 27 at 17:59




When I copy and paste your text then I get 6 lines, some of which are very long. So the question can be rephrased to "How do I sort lines by their length?", or do I miss something? Please also consider that 300 times the letter l may occupy fewer lines than 200 times the letter m when a proportional font is used.
– PerlDuck
Dec 27 at 17:59




1




1




See: stackoverflow.com/questions/5917576/…
– Terrance
Dec 27 at 18:26




See: stackoverflow.com/questions/5917576/…
– Terrance
Dec 27 at 18:26










2 Answers
2






active

oldest

votes


















1














With GNU Awk version 4.0+



gawk '
BEGIN {RS=""; ORS="nn"}
{a[$0] = length($0)}
END {
PROCINFO["sorted_in"] = "@val_num_desc"
for (i in a) print i
}
' file.txt


Note that this sorts on number of characters, including punctuation and whitespace.






share|improve this answer





























    0














    Used this not so optimized command line:



    cat -n notes.txt | sort -rn | head -6 >> result.txt &&  
    cat -n notes.txt | sort -rn | tail -5 | sort -n | head -3 | sort -rn >> result.txt &&
    cat -n notes.txt | sort -rn | tail -5 | sort -n | tail -2 >> result.txt &&
    sed -i 's/^s*[[:digit:]]*s*//g' result.txt


    Information: It splits the whole texts into parts and then puts sort and puts them together and removes the line numbers used to sort them.



    Results:



    After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.



    pretending to be quite friendly. "Sit down and rest." She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



    Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid. The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



    "Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside." "Why not?" asked the prince.



    He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



    The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."






    share|improve this answer





















    • Those head -6 and tail -5 commands make me suspicious that this solution will work for exactly 6 paragraphs. Is that so?
      – PerlDuck
      Dec 27 at 19:07










    • Yes. OP don't seem to say it's not a one of case. So I guess this will do for now.
      – George Udosen
      Dec 27 at 19:10











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1104961%2fhow-can-i-sort-a-text-file-from-number-of-occupied-lines%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    With GNU Awk version 4.0+



    gawk '
    BEGIN {RS=""; ORS="nn"}
    {a[$0] = length($0)}
    END {
    PROCINFO["sorted_in"] = "@val_num_desc"
    for (i in a) print i
    }
    ' file.txt


    Note that this sorts on number of characters, including punctuation and whitespace.






    share|improve this answer


























      1














      With GNU Awk version 4.0+



      gawk '
      BEGIN {RS=""; ORS="nn"}
      {a[$0] = length($0)}
      END {
      PROCINFO["sorted_in"] = "@val_num_desc"
      for (i in a) print i
      }
      ' file.txt


      Note that this sorts on number of characters, including punctuation and whitespace.






      share|improve this answer
























        1












        1








        1






        With GNU Awk version 4.0+



        gawk '
        BEGIN {RS=""; ORS="nn"}
        {a[$0] = length($0)}
        END {
        PROCINFO["sorted_in"] = "@val_num_desc"
        for (i in a) print i
        }
        ' file.txt


        Note that this sorts on number of characters, including punctuation and whitespace.






        share|improve this answer












        With GNU Awk version 4.0+



        gawk '
        BEGIN {RS=""; ORS="nn"}
        {a[$0] = length($0)}
        END {
        PROCINFO["sorted_in"] = "@val_num_desc"
        for (i in a) print i
        }
        ' file.txt


        Note that this sorts on number of characters, including punctuation and whitespace.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 27 at 19:41









        steeldriver

        65.7k11104177




        65.7k11104177

























            0














            Used this not so optimized command line:



            cat -n notes.txt | sort -rn | head -6 >> result.txt &&  
            cat -n notes.txt | sort -rn | tail -5 | sort -n | head -3 | sort -rn >> result.txt &&
            cat -n notes.txt | sort -rn | tail -5 | sort -n | tail -2 >> result.txt &&
            sed -i 's/^s*[[:digit:]]*s*//g' result.txt


            Information: It splits the whole texts into parts and then puts sort and puts them together and removes the line numbers used to sort them.



            Results:



            After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.



            pretending to be quite friendly. "Sit down and rest." She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



            Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid. The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



            "Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside." "Why not?" asked the prince.



            He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



            The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."






            share|improve this answer





















            • Those head -6 and tail -5 commands make me suspicious that this solution will work for exactly 6 paragraphs. Is that so?
              – PerlDuck
              Dec 27 at 19:07










            • Yes. OP don't seem to say it's not a one of case. So I guess this will do for now.
              – George Udosen
              Dec 27 at 19:10
















            0














            Used this not so optimized command line:



            cat -n notes.txt | sort -rn | head -6 >> result.txt &&  
            cat -n notes.txt | sort -rn | tail -5 | sort -n | head -3 | sort -rn >> result.txt &&
            cat -n notes.txt | sort -rn | tail -5 | sort -n | tail -2 >> result.txt &&
            sed -i 's/^s*[[:digit:]]*s*//g' result.txt


            Information: It splits the whole texts into parts and then puts sort and puts them together and removes the line numbers used to sort them.



            Results:



            After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.



            pretending to be quite friendly. "Sit down and rest." She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



            Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid. The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



            "Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside." "Why not?" asked the prince.



            He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



            The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."






            share|improve this answer





















            • Those head -6 and tail -5 commands make me suspicious that this solution will work for exactly 6 paragraphs. Is that so?
              – PerlDuck
              Dec 27 at 19:07










            • Yes. OP don't seem to say it's not a one of case. So I guess this will do for now.
              – George Udosen
              Dec 27 at 19:10














            0












            0








            0






            Used this not so optimized command line:



            cat -n notes.txt | sort -rn | head -6 >> result.txt &&  
            cat -n notes.txt | sort -rn | tail -5 | sort -n | head -3 | sort -rn >> result.txt &&
            cat -n notes.txt | sort -rn | tail -5 | sort -n | tail -2 >> result.txt &&
            sed -i 's/^s*[[:digit:]]*s*//g' result.txt


            Information: It splits the whole texts into parts and then puts sort and puts them together and removes the line numbers used to sort them.



            Results:



            After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.



            pretending to be quite friendly. "Sit down and rest." She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



            Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid. The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



            "Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside." "Why not?" asked the prince.



            He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



            The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."






            share|improve this answer












            Used this not so optimized command line:



            cat -n notes.txt | sort -rn | head -6 >> result.txt &&  
            cat -n notes.txt | sort -rn | tail -5 | sort -n | head -3 | sort -rn >> result.txt &&
            cat -n notes.txt | sort -rn | tail -5 | sort -n | tail -2 >> result.txt &&
            sed -i 's/^s*[[:digit:]]*s*//g' result.txt


            Information: It splits the whole texts into parts and then puts sort and puts them together and removes the line numbers used to sort them.



            Results:



            After traveling about for a long time they came to a town where there was a beautiful but proud princess. She had made it known that she would marry any man who could ask her a riddle that she could not solve. However, if she solved it his head would be cut off. She had three days to think about it, but was so clever that she always solved the riddle that she had been given before the deadline. When the prince arrived nine men had already died in this manner. However, he was blinded by her great beauty and was willing to risk his life for it.



            pretending to be quite friendly. "Sit down and rest." She blew into the coals on which she was cooking something in a small pot. The daughter warned the two to be cautious, to eat nothing, and to drink nothing, for the old woman brewed evil drinks. They slept soundly until early morning.



            Then he realized that he had come to a witch's house, but because it was dark, and he could go no further, he entered. In any event, he was not afraid. The old woman was sitting in an armchair by the fire. She looked at the stranger with her red eyes. "Good evening," she croaked,



            "Oh, yes," said the girl in a sad voice, "You certainly can, but I do not advise you to do so. Do not go inside." "Why not?" asked the prince.



            He spoke to her, saying, "Dear child, can my servant and I find shelter for the night in this little house?"



            The girl sighed and said, "My stepmother practices evil arts, and she does not like strangers."







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 27 at 18:31









            George Udosen

            19.7k94267




            19.7k94267












            • Those head -6 and tail -5 commands make me suspicious that this solution will work for exactly 6 paragraphs. Is that so?
              – PerlDuck
              Dec 27 at 19:07










            • Yes. OP don't seem to say it's not a one of case. So I guess this will do for now.
              – George Udosen
              Dec 27 at 19:10


















            • Those head -6 and tail -5 commands make me suspicious that this solution will work for exactly 6 paragraphs. Is that so?
              – PerlDuck
              Dec 27 at 19:07










            • Yes. OP don't seem to say it's not a one of case. So I guess this will do for now.
              – George Udosen
              Dec 27 at 19:10
















            Those head -6 and tail -5 commands make me suspicious that this solution will work for exactly 6 paragraphs. Is that so?
            – PerlDuck
            Dec 27 at 19:07




            Those head -6 and tail -5 commands make me suspicious that this solution will work for exactly 6 paragraphs. Is that so?
            – PerlDuck
            Dec 27 at 19:07












            Yes. OP don't seem to say it's not a one of case. So I guess this will do for now.
            – George Udosen
            Dec 27 at 19:10




            Yes. OP don't seem to say it's not a one of case. So I guess this will do for now.
            – George Udosen
            Dec 27 at 19:10


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1104961%2fhow-can-i-sort-a-text-file-from-number-of-occupied-lines%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Questions related to Moebius Transform of Characteristic Function of the Primes

            List of scandals in India

            Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?