[Techtalk] count pages of text file
Kathryn Hogg
kjh at flyballdogs.com
Thu Dec 8 15:14:35 EST 2005
Noir wrote:
> I have a README text file that I need to print out.
> But I need to know how many pages it would be before I
> print it. Is there any tools or methods I can use to
> get the total page number?
>
> I can get the lines, words and size of the file with
> wc but what about page number?
expr $(wc -l $file | awk '{print $1}') / $lines_per_page
Of course that is off by one if its not evenly divisible but thats an
exercise for the reader.
--
Kathryn
http://womensfooty.com
More information about the Techtalk
mailing list