# Doing page break using unix scripting and awk

## 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
627704
• Total Posts
2978716

• 21
• 14
• 12
• 10
• 12