01-20-2020
Thanks for this.
Can you please explain the last line of code using the original file twice before the last output?
Quote:
/This is the last line of the page/{printf("Page No:%d of %d\n", ++page, total)' textfile1 textfile1 > textfile12
Using your snippet solves the issue although the final outfile only has the page numbers in a file but nothing else.
Quote:
Page No:1 of 3
Page No:2 of 3
Page No:3 of 3
8 More Discussions You Might Find Interesting
1. News, Links, Events and Announcements
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
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
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
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?
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
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
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
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
LEARN ABOUT DEBIAN
hexeditor
HEXEDITOR(1) General Commands Manual HEXEDITOR(1)
NAME
hexeditor - Full screen curses Hex editor
SYNOPSIS
hexeditor [ -8abdfgqrv ] [ filename ]
DESCRIPTION
Hexeditor is an editor to edit binary (or any) files or disks. The Display consists of the current offset from 0 (the first byte), the
next sixteen bytes (aligned by bytes or 32-bit words), and its ASCII or EBCDIC text representation.
OPTIONS
-h, --help
Display help
-8, --highbit
Display 8-bit text
-a, --alltext
Display all text regardless that you know better
-b, --buffer
Buffer the entire file into memory. Faster, and enables insert and delete.
-d, --disk
File editing is a disk. OpenBSD and Linux only.
-f, --force
Force editing of a disk. Need this option to enable writing to disks.
-q, --quiet
Quiet Mode; Turn off all beeping.
-r, --readonly
Do not allow modifying the file
-v, --version
Display version number
Commands and keys
^A Insert byte
Insert Insert byte
^D Delete byte
Delete Delete byte
^E viEw as text dump
^F Page down
^V Page down
Page Down
Page down
^B Page Up
^Y Page Up
Alt-V Page Up
Page Up
Page Up
Tab Switch from hex to text representation
^I Switch from hex to text representation
^T goTo offset
^G Get help
^L Redraw screen
^C Quit without saving
^O Save
^X Save and Quit
^W Search (text/hex)
^N find Next
^U Undo
^R ASCII <=> EBCDIC
^P Switch Spacings
^+ Binary Calculator
Author
Adam Rogoyski <apoc@laker.net>
See Also
od (1)
BUGS
Editing disks is only supported in Linux and OpenBSD.
Please email Adam Rogoyski <apoc@laker.net> with any bugs you might find. This man page is intentionally brief. Please Read the included
documentation in Texinfo format for additional information
HEXEDITOR(1)