LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Insert multiple lines in specificic position with sed or awk (https://www.linuxquestions.org/questions/linux-newbie-8/insert-multiple-lines-in-specificic-position-with-sed-or-awk-4175426956/)

micronemo 09-12-2012 07:04 PM

Insert multiple lines in specificic position with sed or awk
 
i have a file "pippo.txt" with 10 line of text . i must add a blank line in 4 and 7 position.
someone can help me ?
thanks very much

pixellany 09-12-2012 07:44 PM

Just open the file with a text editor---why would you need SED or AWK?

If you need to do it with SED, here's the command:
http://www.grymoire.com/Unix/Sed.html#uh-41

(That site is the #1 tutorial on many things---covers AWK also)

micronemo 09-12-2012 08:01 PM

this command go in bash script

grail 09-13-2012 07:23 AM

And what have you done towards solving the problem? (apart from asking the question)

pixellany 09-13-2012 07:27 AM

Quote:

Originally Posted by micronemo (Post 4778948)
this command go in bash script

Did you look at the link I provided?


All times are GMT -5. The time now is 11:35 AM.