Sign in to follow this  

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
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"
in your awk commands

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

Share this post


Link to post
Share on other sites
Sign in to follow this