Doing page break using unix scripting and awk

This topic is 4167 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi, I faced a problem here. Currently, I have a script which will insert lines of text into a file. However, There is a need for me to do a page break at some point of time due to some criteria. I am quite new to unix scripting...As such, I need to know a method to do such page breaks, either using awk or some other mechanism in unix scripting. Can someone please share? This is quite urgent. Thanks a lot and Best Regards.

Share on other sites
You could try inserting a formfeed character (ascii code 12) into the file. This will add it to the end of the specified file:
echo -e "\f" >> your_file

Not sure how you'd insert one in the middle of a file though.. hope it helps.

edit: you can also use
print "\f"

[Edited by - necromancer_df on July 24, 2006 4:28:09 AM]

• Forum Statistics

• Total Topics
628730
• Total Posts
2984427

• 25
• 11
• 10
• 16
• 14