Sponsored Content
Top Forums Shell Programming and Scripting Awk: Page number with total number of pages, EG Page 1 of 5 Post 303043175 by tugar on Monday 20th of January 2020 06:55:44 PM
Old 01-20-2020
Thanks for this, this works but it looks like the whole document is being repeated?

Code:
#!/usr/local/bin/awk -f
#
#

BEGIN {FS=";"}

/This is the last line of the page/{a++;$0=$0"\n                          Page No:"a}1
/This is the last line of the page/{a++;$0=$0"\n                          Page Total:"a}1

Moderator's Comments:
Mod Comment
Please use code tags when posting data and code samples!

Last edited by vgersh99; 01-20-2020 at 07:58 PM.. Reason: code tags, please!
 

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
MojoMojo::Controller::Page(3pm) 			User Contributed Perl Documentation			   MojoMojo::Controller::Page(3pm)

NAME
MojoMojo::Controller::Page - Page controller SYNOPSIS
DESCRIPTION
This controller is the main juice of MojoMojo. It handles all the actions related to wiki pages. Actions are redispatched to this controller based on MojoMojo's custom prepare_path method. Every private action here expects to have a page path in args. They can be called with urls like "/page1/page2.action". ACTIONS
view (.view) This is probably the most common action in MojoMojo. A lot of the other actions redispatch to this one. It will prepare the stash for page view, and set the template to "view.tt", unless another is already set. It also takes an optional 'rev' parameter, in which case it will load the provided revision instead. search (.search) This action is called as ".search" on the current page when the user performs a search. The user can choose to search the entire site or a subtree starting from the current page. print This action is the same as the "view" action, but with a printer-friendly template. inline Same as "view" action, but with a template that only outputs the barebones body of the page. There are no headers, footers, or navigation bars. Useful for transclusion (see MojoMojo::Formatter::Include). inline_tags (.inline_tags) Tag list for the bottom of page views. pages_viewable($c, $user, @pages) Filters an array of pages, returning only those that the given user has permission to view. list (.list) All nodes in this namespace. Computes tags, all pages, backlinks, wanted and orphan pages. subtree (.subtree) Display all pages that are part of the subtree for the current node. recent (.recent) Recently changed pages in this namespace. Also computes the most used tags. feeds (.feeds) Overview of available feeds for this node. rss (.rss) RSS feed with headlines of recent nodes in this namespace. atom (.atom) Full content ATOM feed of recent nodes in this namespace. rss_full (.rss_full) Full content RSS feed of recent nodes in this namespace. export (.export) Page showing available export options. suggest (.suggest) "Page not found" page, suggesting alternatives, and allowing creation of the page. Root::auto detaches here for actions on nonexistent pages (e.g. c<bogus.export>). search_inline (.search/inline) Search results embeddable in another page (for use with "suggest"). info (.info) Meta information about the current page: revision list, content size, number of children and descendants, links to/from, attachments. AUTHOR
Marcus Ramberg <mramberg@cpan.org> LICENSE
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-09-02 MojoMojo::Controller::Page(3pm)
All times are GMT -4. The time now is 09:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy