Add four lines between sentences

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Is there an easy way to add four empty lines between each sentence.



For example, this paragraph:



This combination of vitamins and selected minerals is used to prevent or treat vitamin 
deficiency due to poor eating habits, problems that affect the body's ability to absorb nutrition from food, or increased need for vitamins and minerals due to stress
or illness. Vitamins are needed for the body to function well.
This vitamin/mineral combination contains high levels of B vitamins (e.g., folic acid,
niacin, B-1, B-2, B-6, and B-12) and vitamin C. It also contains other vitamins (A, D, and E) and minerals such as zinc. This medication does not contain iron and has only a
small amount of calcium. Therefore, it should not be used to treat "iron-poor" blood
(anemia) or to prevent osteoporosis.


How I can make it:



This combination of vitamins and selected minerals is used to prevent or treat vitamin 




deficiency due to poor eating habits, problems that affect the body's ability to absorb nutrition from food, or increased need for vitamins and minerals due to stress




or illness. Vitamins are needed for the body to function well.




This vitamin/mineral combination contains high levels of B vitamins (e.g., folic acid,




niacin, B-1, B-2, B-6, and B-12) and vitamin C. It also contains other vitamins (A, D, and E) and minerals such as zinc. This medication does not contain iron and has only a




small amount of calcium. Therefore, it should not be used to treat "iron-poor" blood




(anemia) or to prevent osteoporosis.


I would like:



1- to add four blank spaces between each line.



2- to add one blank space after the first line then every four spaces










share|improve this question









New contributor




Gabi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Add four lines between every line: sed 's/$/nnnn/' file
    – Cyrus
    1 hour ago















up vote
1
down vote

favorite












Is there an easy way to add four empty lines between each sentence.



For example, this paragraph:



This combination of vitamins and selected minerals is used to prevent or treat vitamin 
deficiency due to poor eating habits, problems that affect the body's ability to absorb nutrition from food, or increased need for vitamins and minerals due to stress
or illness. Vitamins are needed for the body to function well.
This vitamin/mineral combination contains high levels of B vitamins (e.g., folic acid,
niacin, B-1, B-2, B-6, and B-12) and vitamin C. It also contains other vitamins (A, D, and E) and minerals such as zinc. This medication does not contain iron and has only a
small amount of calcium. Therefore, it should not be used to treat "iron-poor" blood
(anemia) or to prevent osteoporosis.


How I can make it:



This combination of vitamins and selected minerals is used to prevent or treat vitamin 




deficiency due to poor eating habits, problems that affect the body's ability to absorb nutrition from food, or increased need for vitamins and minerals due to stress




or illness. Vitamins are needed for the body to function well.




This vitamin/mineral combination contains high levels of B vitamins (e.g., folic acid,




niacin, B-1, B-2, B-6, and B-12) and vitamin C. It also contains other vitamins (A, D, and E) and minerals such as zinc. This medication does not contain iron and has only a




small amount of calcium. Therefore, it should not be used to treat "iron-poor" blood




(anemia) or to prevent osteoporosis.


I would like:



1- to add four blank spaces between each line.



2- to add one blank space after the first line then every four spaces










share|improve this question









New contributor




Gabi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Add four lines between every line: sed 's/$/nnnn/' file
    – Cyrus
    1 hour ago













up vote
1
down vote

favorite









up vote
1
down vote

favorite











Is there an easy way to add four empty lines between each sentence.



For example, this paragraph:



This combination of vitamins and selected minerals is used to prevent or treat vitamin 
deficiency due to poor eating habits, problems that affect the body's ability to absorb nutrition from food, or increased need for vitamins and minerals due to stress
or illness. Vitamins are needed for the body to function well.
This vitamin/mineral combination contains high levels of B vitamins (e.g., folic acid,
niacin, B-1, B-2, B-6, and B-12) and vitamin C. It also contains other vitamins (A, D, and E) and minerals such as zinc. This medication does not contain iron and has only a
small amount of calcium. Therefore, it should not be used to treat "iron-poor" blood
(anemia) or to prevent osteoporosis.


How I can make it:



This combination of vitamins and selected minerals is used to prevent or treat vitamin 




deficiency due to poor eating habits, problems that affect the body's ability to absorb nutrition from food, or increased need for vitamins and minerals due to stress




or illness. Vitamins are needed for the body to function well.




This vitamin/mineral combination contains high levels of B vitamins (e.g., folic acid,




niacin, B-1, B-2, B-6, and B-12) and vitamin C. It also contains other vitamins (A, D, and E) and minerals such as zinc. This medication does not contain iron and has only a




small amount of calcium. Therefore, it should not be used to treat "iron-poor" blood




(anemia) or to prevent osteoporosis.


I would like:



1- to add four blank spaces between each line.



2- to add one blank space after the first line then every four spaces










share|improve this question









New contributor




Gabi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











Is there an easy way to add four empty lines between each sentence.



For example, this paragraph:



This combination of vitamins and selected minerals is used to prevent or treat vitamin 
deficiency due to poor eating habits, problems that affect the body's ability to absorb nutrition from food, or increased need for vitamins and minerals due to stress
or illness. Vitamins are needed for the body to function well.
This vitamin/mineral combination contains high levels of B vitamins (e.g., folic acid,
niacin, B-1, B-2, B-6, and B-12) and vitamin C. It also contains other vitamins (A, D, and E) and minerals such as zinc. This medication does not contain iron and has only a
small amount of calcium. Therefore, it should not be used to treat "iron-poor" blood
(anemia) or to prevent osteoporosis.


How I can make it:



This combination of vitamins and selected minerals is used to prevent or treat vitamin 




deficiency due to poor eating habits, problems that affect the body's ability to absorb nutrition from food, or increased need for vitamins and minerals due to stress




or illness. Vitamins are needed for the body to function well.




This vitamin/mineral combination contains high levels of B vitamins (e.g., folic acid,




niacin, B-1, B-2, B-6, and B-12) and vitamin C. It also contains other vitamins (A, D, and E) and minerals such as zinc. This medication does not contain iron and has only a




small amount of calcium. Therefore, it should not be used to treat "iron-poor" blood




(anemia) or to prevent osteoporosis.


I would like:



1- to add four blank spaces between each line.



2- to add one blank space after the first line then every four spaces







text-processing awk sed text-formatting






share|improve this question









New contributor




Gabi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Gabi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 30 mins ago









Jeff Schaller

33.9k851113




33.9k851113






New contributor




Gabi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 1 hour ago









Gabi

284




284




New contributor




Gabi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Gabi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Gabi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • Add four lines between every line: sed 's/$/nnnn/' file
    – Cyrus
    1 hour ago

















  • Add four lines between every line: sed 's/$/nnnn/' file
    – Cyrus
    1 hour ago
















Add four lines between every line: sed 's/$/nnnn/' file
– Cyrus
1 hour ago





Add four lines between every line: sed 's/$/nnnn/' file
– Cyrus
1 hour ago











1 Answer
1






active

oldest

votes

















up vote
3
down vote













sed can do it



sed 'G;G;G;G' file


Explanation 💡:



According to sed man the flag G is to append a newline to the contents of the pattern space, and then append the contents of the hold space to that of the pattern space.



In the command above every G would add one new line.



In order to add one blank space after the first line then one empty space every four lines,



In GNU sed:



sed '1~4G' file


1~4 means match every four lines starting with line first,so the above command will begin creating a blank line after the first line and then every four lines.






share|improve this answer






















  • Hi @Goro thank you for the answer and explanation. I have second question, how can I add one empty line every four lines?
    – Gabi
    58 mins ago










  • @Gabi you are welcome! please update the text of the question, include any additional questions you may have to avoid confusing people. then I will update my answer accordingly!
    – Goro
    54 mins ago






  • 1




    I added the new question@Goro thanks
    – Gabi
    48 mins ago










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Gabi is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475398%2fadd-four-lines-between-sentences%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote













sed can do it



sed 'G;G;G;G' file


Explanation 💡:



According to sed man the flag G is to append a newline to the contents of the pattern space, and then append the contents of the hold space to that of the pattern space.



In the command above every G would add one new line.



In order to add one blank space after the first line then one empty space every four lines,



In GNU sed:



sed '1~4G' file


1~4 means match every four lines starting with line first,so the above command will begin creating a blank line after the first line and then every four lines.






share|improve this answer






















  • Hi @Goro thank you for the answer and explanation. I have second question, how can I add one empty line every four lines?
    – Gabi
    58 mins ago










  • @Gabi you are welcome! please update the text of the question, include any additional questions you may have to avoid confusing people. then I will update my answer accordingly!
    – Goro
    54 mins ago






  • 1




    I added the new question@Goro thanks
    – Gabi
    48 mins ago














up vote
3
down vote













sed can do it



sed 'G;G;G;G' file


Explanation 💡:



According to sed man the flag G is to append a newline to the contents of the pattern space, and then append the contents of the hold space to that of the pattern space.



In the command above every G would add one new line.



In order to add one blank space after the first line then one empty space every four lines,



In GNU sed:



sed '1~4G' file


1~4 means match every four lines starting with line first,so the above command will begin creating a blank line after the first line and then every four lines.






share|improve this answer






















  • Hi @Goro thank you for the answer and explanation. I have second question, how can I add one empty line every four lines?
    – Gabi
    58 mins ago










  • @Gabi you are welcome! please update the text of the question, include any additional questions you may have to avoid confusing people. then I will update my answer accordingly!
    – Goro
    54 mins ago






  • 1




    I added the new question@Goro thanks
    – Gabi
    48 mins ago












up vote
3
down vote










up vote
3
down vote









sed can do it



sed 'G;G;G;G' file


Explanation 💡:



According to sed man the flag G is to append a newline to the contents of the pattern space, and then append the contents of the hold space to that of the pattern space.



In the command above every G would add one new line.



In order to add one blank space after the first line then one empty space every four lines,



In GNU sed:



sed '1~4G' file


1~4 means match every four lines starting with line first,so the above command will begin creating a blank line after the first line and then every four lines.






share|improve this answer














sed can do it



sed 'G;G;G;G' file


Explanation 💡:



According to sed man the flag G is to append a newline to the contents of the pattern space, and then append the contents of the hold space to that of the pattern space.



In the command above every G would add one new line.



In order to add one blank space after the first line then one empty space every four lines,



In GNU sed:



sed '1~4G' file


1~4 means match every four lines starting with line first,so the above command will begin creating a blank line after the first line and then every four lines.







share|improve this answer














share|improve this answer



share|improve this answer








edited 42 mins ago

























answered 1 hour ago









Goro

9,07664486




9,07664486











  • Hi @Goro thank you for the answer and explanation. I have second question, how can I add one empty line every four lines?
    – Gabi
    58 mins ago










  • @Gabi you are welcome! please update the text of the question, include any additional questions you may have to avoid confusing people. then I will update my answer accordingly!
    – Goro
    54 mins ago






  • 1




    I added the new question@Goro thanks
    – Gabi
    48 mins ago
















  • Hi @Goro thank you for the answer and explanation. I have second question, how can I add one empty line every four lines?
    – Gabi
    58 mins ago










  • @Gabi you are welcome! please update the text of the question, include any additional questions you may have to avoid confusing people. then I will update my answer accordingly!
    – Goro
    54 mins ago






  • 1




    I added the new question@Goro thanks
    – Gabi
    48 mins ago















Hi @Goro thank you for the answer and explanation. I have second question, how can I add one empty line every four lines?
– Gabi
58 mins ago




Hi @Goro thank you for the answer and explanation. I have second question, how can I add one empty line every four lines?
– Gabi
58 mins ago












@Gabi you are welcome! please update the text of the question, include any additional questions you may have to avoid confusing people. then I will update my answer accordingly!
– Goro
54 mins ago




@Gabi you are welcome! please update the text of the question, include any additional questions you may have to avoid confusing people. then I will update my answer accordingly!
– Goro
54 mins ago




1




1




I added the new question@Goro thanks
– Gabi
48 mins ago




I added the new question@Goro thanks
– Gabi
48 mins ago










Gabi is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















Gabi is a new contributor. Be nice, and check out our Code of Conduct.












Gabi is a new contributor. Be nice, and check out our Code of Conduct.











Gabi is a new contributor. Be nice, and check out our Code of Conduct.













 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475398%2fadd-four-lines-between-sentences%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

List of Gilmore Girls characters

Confectionery