Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > insert blank li...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 2202 of 2236
Post > Topic >>

insert blank line

by Dieter Kraft <kraft@[EMAIL PROTECTED] > Mar 25, 2008 at 07:18 PM

Hi,

I have a shell script
with (1000) contiguous textlines like

    ampl Models/aircrftb.mod  >   Output/aircrftb.out
    ampl Models/airport.mod   >   Output/airport.out
    ampl Models/aljazzaf.mod  >   Output/aljazzaf.out
    ampl Models/allinitc.mod  >   Output/allinitc.out
    ampl Models/allinit.mod   >   Output/allinit.out
    ampl Models/allinitu.mod  >   Output/allinitu.out
    ampl Models/alsotame.mod  >   Output/alsotame.out

before each line I want to insert a new line to print
the model name into a TeX file, like

printf '%s' "  aircrftb & " >> TABLE.TEX
and
printf '%s' "  airport & " >> TABLE.TEX
etc.

How can I do this in sed or awk?
Any help is greatly appreciated.

Dieter

kraft@[EMAIL PROTECTED]





 5 Posts in Topic:
insert blank line
Dieter Kraft <kraft@[E  2008-03-25 19:18:31 
Re: insert blank line
pk <pk@[EMAIL PROTECTE  2008-03-25 20:46:52 
Re: insert blank line
Dieter Kraft <kraft@[E  2008-03-25 21:48:42 
Re: insert blank line
pk <pk@[EMAIL PROTECTE  2008-03-25 22:52:28 
Re: insert blank line
Stephane CHAZELAS <thi  2008-03-26 13:30:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 13:03:19 CDT 2008.