Operating System - HP-UX
1834397 Members
2092 Online
110067 Solutions
New Discussion

Adding a trailing FormFeed Chareter

 
SOLVED
Go to solution
Marty Metras
Super Advisor

Adding a trailing FormFeed Chareter

I have a few reports (Text files) that get printed and they do not form feed like they should.
I need a tempurary fix. This would to insert a formfeed char on the end of the text file to force a formfeed.
How do I insert a formfeed charater into a text file? Well, how would put any control char into a text file.
Something like cat "control nnn" >>filename.txt

Marty
The only thing that always remain the same are the changes.
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Adding a trailing FormFeed Chareter

echo "\f\c" >> filename.txt
If it ain't broke, I can fix that.
Marty Metras
Super Advisor

Re: Adding a trailing FormFeed Chareter

Great!
Thanks,
Marty
The only thing that always remain the same are the changes.
Steve Post
Trusted Contributor

Re: Adding a trailing FormFeed Chareter

If you are making a file with vi by hand,
If you are printing to a laserjet:

Then...
You can put a page break in a text file in vi by doing this:
1. go to the spot I want the page break.
2. type i (insert)
3. type control-V (means take the next character literally)
4. type control-L (means form feed to hp laserjets).
5. escape.