Page Break in a file for printing


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Page Break in a file for printing
# 1  
Old 03-13-2012
Page Break in a file for printing

Hi,

We have 1lac records in source file and unix script will genarate around 1000 files.
From target location the files are taking for printing on physical papers.

the page size limitation : 256 Lines


Can you please tell me how to insert the page break in a flat file for printer.
# 2  
Old 03-13-2012
How man lines in the file?
You could look at the split command
# 3  
Old 03-13-2012
Dont pay too much attention to my previous post - I just got to work... was stuck half an hour in a motorway tunnel on my motorcycle, my head and brains "fumed would you say?" need fresh air...
Just so you see how crazy I went on the idea: splitting the files into multiple then appending them again while adding a blanc page between...
# 4  
Old 03-13-2012
Something puzzles me: files unless coded in have no pages, just record lines...
Isn't you printer going to print 256 lines/page?
# 5  
Old 03-13-2012
If you split on your required page length, then you can concatanate them back together with a <CNTL>L character. That usually causes a page throw.



Robin
# 6  
Old 03-13-2012
Hi.

I'd consider using pr:
Code:
NAME
       pr - convert text files for printing

      -F, -f, --form-feed
              use form feeds instead of newlines to separate pages (by a
              3-line page header with -F or a 5-line header and trailer
              without -F)

       -l PAGE_LENGTH, --length=PAGE_LENGTH
              set the page length to PAGE_LENGTH (66) lines (default number of
              lines of text 56, and with -F 63)

-- excerpt from man pr, q.v.

And has many, many other options ... cheers, drl
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Insert FF (feed form) in text file so that when printing the printer print on a new page accordingly

Hello. First happy new year to everybody. I have a script that generate a text file ( /tmp/part_list.txt for example ). This file can be edited using a kde graphical text editor like kate or kwrite The file can be printed out from command line or within the text editor using the print... (5 Replies)
Discussion started by: jcdole
5 Replies

2. How to Post in the The UNIX and Linux Forums

Printing a 'right arrow' on a new page at the End Of Job

Hi, I have set up an HP printer, Model P3005dn" on our server running HP-Ux 11.31. The printing is fine but I'm also getting an extra page printed with an right arrow (-->) only. I suspect that this could be the "Tab Expansion" or a "CR/LF" character. Can ayone please advise what could... (0 Replies)
Discussion started by: Koketso
0 Replies

3. UNIX for Dummies Questions & Answers

Insert a break page after certain string using SED

Hi: I have 2 files: teststring.txt and a tempfile.txt teststring file contains: s/Primary Ins./\n1/g I'm trying to search for "Primary Ins." string in tempfile. For every "Primary Ins." string that is found, a new line is inserted and put in number 1. Then, write out the newfile... (7 Replies)
Discussion started by: newbeee
7 Replies

4. Shell Programming and Scripting

Page Break in large file

Hi, The shell script inserting the millions of rows into target flat file system and handling the line number for each line. We need a page break line after every 10,000 lines. is there any command to insert a page break line into target file. (3 Replies)
Discussion started by: koti_rama
3 Replies

5. AIX

AIX Printer Issue: Blank Page Printing.

We have configured Network printers in AIX 6.1. We are facing a Weird problem in Printing. While printing the user is getting a blank page after 2 pages. Please let us know the cause of this issue and ways to rectify it. If this is problem with banner/feeds how to view the default banner... (1 Reply)
Discussion started by: sugan_p
1 Replies

6. Windows & DOS: Issues & Discussions

Linux to Windows Printing: PDF starts printing from middle of page.

We are using Red Hat. We have a issue like this: We want to print from Linux, to a printer attached to a Windows machine. What we want to print is a PDF. It prints, but the printing starts from the middle of the page. In the report, there is no space at the top but still printing starts from the... (5 Replies)
Discussion started by: rohan69
5 Replies

7. Shell Programming and Scripting

Printing to a web page

I have a shell script that runs periodic upgrades on machines. I want to print certain echo commands from the shell script onto a webpage. What command in shell should I use for doing this. (1 Reply)
Discussion started by: lassimanji
1 Replies

8. Shell Programming and Scripting

help on page break

Hi, i have a file say samp.s which has 123 a b c d 123 e f g h 123 i j k l 123 m n o p 234 a b c d 234 e f g h 234 i j k l the first 3 characters in each line are considered the key values i have one more file temp.txt which has 123 234 i want to have a page break in... (5 Replies)
Discussion started by: Sheema
5 Replies

9. Shell Programming and Scripting

Page Break with AWK or SED

Hello All, I am new to unix scripting, I have an urgent issue Is it possible to do a group by on the last column and then a page break on the text file. For example I have a text file, below is the example data STRT 2154081~VA ~23606 ~TM14~8506~1485 STRT 2130893~VA ~23602 ~TM15~8602~1586... (4 Replies)
Discussion started by: udaybo
4 Replies

10. Shell Programming and Scripting

Printing Pictures in Unix (company logo on top of page??)

I am trying to attach a company logo to the top of a laser report can anyone tell me how to attach a .jpg or .bmp file to a report?? (1 Reply)
Discussion started by: hughes0928
1 Replies
Login or Register to Ask a Question