Page breaks

Page breaks

Post by Davi » Thu, 05 Feb 2004 13:28:40



I'd like to insert page breaks at various points into a plain text
file.  The file will be converted to dos format using the unix2dos
utility (Solaris) and then printed out on a Windows workstation, so
the page breaks have to be understood by Windows.

Is there any way to do this? : )

 
 
 

Page breaks

Post by A. Alper ATIC » Thu, 05 Feb 2004 20:23:46



Quote:>I'd like to insert page breaks at various points into a plain text
>file.  The file will be converted to dos format using the unix2dos
>utility (Solaris) and then printed out on a Windows workstation, so
>the page breaks have to be understood by Windows.

>Is there any way to do this? : )

To insert page breaks every 60 lines:

sed '60~60 s/$/\n\f/' txtfile

(escapes in replacement are Gnu ext)

 
 
 

Page breaks

Post by Stephane CHAZELA » Thu, 05 Feb 2004 20:43:40


2004-02-04, 13:23(+02), A Alper ATICI:
[...]

Quote:> sed '60~60 s/$/\n\f/' txtfile

> (escapes in replacement are Gnu ext)

As well as 60 ~ 60 (only in recent versions)
(note that it was in ssed before being in gsed).

awk '{print} NR % 60 == 0 {printf "\f"}' txtfile

should work with every awk.

--
Stphane                      ["Stephane.Chazelas" at "free.fr"]

 
 
 

1. Question: How to cause printer page breaks using printcap?

 One piece of advice I can give...the easy way out...is to
get and install and use 'apsfilter' program...*many* people
seem to have problems mastering the art of
/etc/printcap...'apsfilter' will take care of it for
you..it's pretty good.
  Check sunsite for it.
-t-

2. A newbie and a network card

3. TICKLISH PROBLEM: How do you implement 'page- break'??

4. Win32 Drivers running under Linux

5. Script to insert page breaks

6. Slackware 3 install problem

7. MAN and page breaks...

8. sendmail 8.6.10 broke mail

9. insert page break in HTML when browser print

10. Apache 1.3.14 as proxy == Microsoft Home Page broken

11. page breaks

12. How to insert page break in vi

13. lyx and page breaks