Sponsored Content
Top Forums Shell Programming and Scripting Awk: Page number with total number of pages, EG Page 1 of 5 Post 303043182 by vgersh99 on Monday 20th of January 2020 08:55:38 PM
Old 01-20-2020
Quote:
Originally Posted by tugar
That's perfect almost!

For some reason, the output file is inserting the original 3 pages without that last line followed by the desired output of the 3 pages with the page numbers. So for 3 pages of data we have 6 pages.


What is happening with having the 2 input files as argument before the output file?
Code:
textfile1 textfile1 > textfile12

we're parsing input file testfile1 TWICE: one for calculating the total number of pages AND second for inserting the No:N of M
For teh missing numberings for the pages 1 through 3, you must either have the footer missing OR the footer line is somehow different than the one on the other 3 pages where the totals are printed.
Make sure IF the footers are present they are formatted EXACTLY as expected - word by word, space by space....

Last edited by vgersh99; 01-20-2020 at 10:15 PM..
 

8 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Unix Manual (man-page) pages in HTML

LINK: Unix Manual (man page) pages in HTML http://www.rt.com/man/ : More then 100 Commands found on a Unix system mannual pages can be obtained/refered here. Good Link.. (1 Reply)
Discussion started by: killerserv
1 Replies

2. Shell Programming and Scripting

Perl find page number in a file

Hi i want to ask how can i use perl and find a word in a text file, and also telling that which page doesn't it exist? Eample: have a 10 pages text file, then i need to find 'Hello' in the file, and show that which page is it contain in. Output: Hello contains 8 times in page 1, 3, 4, 7, 10... (9 Replies)
Discussion started by: mingming88
9 Replies

3. Shell Programming and Scripting

How to input a number in a web page and pass to a script?

I am working on an embedded linux router and trying to make a webpage where the user can input a desired number of CPE and have a script update that number on the router. I have a CLI where I can log in and type the following to change that number echo "20">/proc/net/dbrctl/maxcpe which then... (7 Replies)
Discussion started by: BobTheBulldog
7 Replies

4. Emergency UNIX and Linux Support

Grab total page read from webalizer display in html

Hi, I need a way to grab the total combines since inception, total pages read from webalizer on my centos server or any other location (as long as since inception) and display the result live on my website So with each visit it would be increasing, or perhaps live (ajax) not sure But can... (0 Replies)
Discussion started by: lawstudent
0 Replies

5. What is on Your Mind?

Fedora Man Pages Reported Attack Page?

Is firefox complaining to anyone else that this is a Reported Attack Page!? I have used this site a million times and now it feels like complaining. Fedora Manpages: Home (5 Replies)
Discussion started by: cokedude
5 Replies

6. Shell Programming and Scripting

Help with sum total number of record and total number of record problem asking

Input file SFSQW 5192.56 HNRNPK 611.486 QEQW 1202.15 ASDR 568.627 QWET 6382.11 SFSQW 4386.3 HNRNPK 100 SFSQW 500 Desired output file SFSQW 10078.86 3 QWET 6382.11 1 QEQW 1202.15 1 HNRNPK 711.49 2 ASDR 568.63 1 The way I tried: (2 Replies)
Discussion started by: patrick87
2 Replies

7. Shell Programming and Scripting

Splitting of files - Addition of Page Number in the Trailer

Hi, I need your help on the following Scenario : Consider a file has 650 records and I need to split this file into 4 files having a maximum of 200 records in each of them and also for the first splitted file it should get appended with Page 1 as a trailer( Similarly for the second file, Page... (4 Replies)
Discussion started by: Ravichander
4 Replies

8. Shell Programming and Scripting

script for adding page number before page breaks

Hi, If there is an expert that can help: I have many txt files that are produced from pdftotext that include page breaks the page breaks seem to be unix style hex 0C. I want to add page numbers before each page break as in : Page XXXX Regards antman (9 Replies)
Discussion started by: antman
9 Replies
PDF::API2::Page(3pm)					User Contributed Perl Documentation				      PDF::API2::Page(3pm)

NAME
PDF::API2::Page - page management METHODS
$page = PDF::API2::Page->new $pdf, $parent, $index Returns a page object (called from $pdf->page). $page = PDF::API2::Page->coerce $pdf, $pdfpage Returns a page object converted from $pdfpage (called from $pdf->openpage). $page->update Marks a page to be updated (by $pdf->update). $page->mediabox $w, $h $page->mediabox $llx, $lly, $urx, $ury $page->mediabox $alias Sets the mediabox. This method supports the following aliases: '4A', '2A', 'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', '4B', '2B', 'B0', 'B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'LETTER', 'BROADSHEET', 'LEDGER', 'TABLOID', 'LEGAL', 'EXECUTIVE', and '36X36'. ($llx, $lly, $urx, $ury) = $page->get_mediabox Gets the mediabox based one best estimates or the default. $page->cropbox $w, $h $page->cropbox $llx, $lly, $urx, $ury $page->cropbox $alias Sets the cropbox. This method supports the same aliases as mediabox. ($llx, $lly, $urx, $ury) = $page->get_cropbox Gets the cropbox based one best estimates or the default. $page->bleedbox $w, $h $page->bleedbox $llx, $lly, $urx, $ury $page->bleedbox $alias Sets the bleedbox. This method supports the same aliases as mediabox. ($llx, $lly, $urx, $ury) = $page->get_bleedbox Gets the bleedbox based one best estimates or the default. $page->trimbox $w, $h $page->trimbox $llx, $lly, $urx, $ury Sets the trimbox. This method supports the same aliases as mediabox. ($llx, $lly, $urx, $ury) = $page->get_trimbox Gets the trimbox based one best estimates or the default. $page->artbox $w, $h $page->artbox $llx, $lly, $urx, $ury $page->artbox $alias Sets the artbox. This method supports the same aliases as mediabox. ($llx, $lly, $urx, $ury) = $page->get_artbox Gets the artbox based one best estimates or the default. $page->rotate $deg Rotates the page by the given degrees, which must be a multiple of 90. (This allows you to auto-rotate to landscape without changing the mediabox!) $gfx = $page->gfx $prepend Returns a graphics content object. If $prepend is true the content will be prepended to the page description. $txt = $page->text $prepend Returns a text content object. If $prepend is true the content will be prepended to the page description. $ant = $page->annotation Returns a new annotation object. $page->resource $type, $key, $obj Adds a resource to the page-inheritance tree. Example: $co->resource('Font',$fontkey,$fontobj); $co->resource('XObject',$imagekey,$imageobj); $co->resource('Shading',$shadekey,$shadeobj); $co->resource('ColorSpace',$spacekey,$speceobj); Note: You only have to add the required resources, if they are NOT handled by the *font*, *image*, *shade* or *space* methods. AUTHOR
Alfred Reibenschuh perl v5.14.2 2014-03-09 PDF::API2::Page(3pm)
All times are GMT -4. The time now is 05:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy