08-27-2012
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 2 should be the Trailer..For Third it should be Page 3 and so on..).
How can we do this ??
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
All,
I am new to unix and i have the following requirement.
I have file(s) landing into input directory with timestamp, first i want to copy all these files into seperate directory then i want to rename these files without timestamp and also remove header,trailer from that file..
Could... (35 Replies)
Discussion started by: ksrams
35 Replies
2. Shell Programming and Scripting
Situation:
Our system currently executes a job (COBOL Program) that generates an interface file to be sent to one of our vendors. Because this system processes information for over 100,000 employees/retirees (and growing), we'd like to multi-thread the job into processing-groups in order to... (4 Replies)
Discussion started by: oordonez
4 Replies
3. Shell Programming and Scripting
Hi I want to incremental add hex decimal number to a particula field in file
eg: addr =123 dept1=0
addr = 345 dept2 =1
addr2 = 124 dept3 =2
.
.
.
.
.
.
addr3 =567 dept15 =f
Is there any command which add... (8 Replies)
Discussion started by: diddi_linux
8 Replies
4. UNIX for Dummies Questions & Answers
Friends ,
Can u tel me how can i have done multiple addition using shell script ?
Expected Output can be :
1
4
6
---------
Total - 11 (4 Replies)
Discussion started by: meetsubhas
4 Replies
5. Shell Programming and Scripting
Hi all,
Thanks in advance
I want to do simple calculations..using files
for example:
i have 2 files called anish.txt and kumar.txt
anish.txt contains value 10 and kumar.txt contains value 5
anish.txt - kumar.txt = 5
i want to display like this
how to do this process... (17 Replies)
Discussion started by: anishkumarv
17 Replies
6. 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
7. Shell Programming and Scripting
Here is my problem:-
I have a file with pipe separated values.
CR|20121021|079|ABC|N|DLS|00038|DLS|04750|1330597704|634234|634|0
CR|20121021|079|ABC|N|DLS|00038|DLS|05118|2071690102|354|351|3
CR|20121021|079|ABC|N|DLS|00038|DLS|05140|960051505|1088|1088|0... (4 Replies)
Discussion started by: Yoda
4 Replies
8. Shell Programming and Scripting
Hi !
here is my data file column 1 fields
2597
121297
13599
130498
want to print like this
02/05/1997
12/12/1997
13/05/1999
13/04/1998
how to split each field and print in correct way
if there was delimiter I would have done some thing like this
awk '{split($0,a,":");... (13 Replies)
Discussion started by: Akshay Hegde
13 Replies
9. Shell Programming and Scripting
So I've worked how to add page numbers based on regex. It's using the footer text.
How do we get the total amount added so we have page number with the total number of pages?
Desired output: Page No:1 of 5
Thanks in advance. (15 Replies)
Discussion started by: tugar
15 Replies
LEARN ABOUT MOJAVE
mincore
MINCORE(2) BSD System Calls Manual MINCORE(2)
NAME
mincore -- determine residency of memory pages
SYNOPSIS
#include <sys/types.h>
#include <sys/mman.h>
int
mincore(caddr_t addr, size_t len, char *vec);
DESCRIPTION
The mincore() system call allows a process to obtain information about whether pages are core resident. The current core residency of the
pages is returned in the character array vec. For each entry in the character array vec, the following bit values may be set depending upon
the state of the page:
MINCORE_INCORE 0x1 /* Page is incore */
MINCORE_REFERENCED 0x2 /* Page has been referenced by us */
MINCORE_MODIFIED 0x4 /* Page has been modified by us */
MINCORE_REFERENCED_OTHER 0x8 /* Page has been referenced */
MINCORE_MODIFIED_OTHER 0x10 /* Page has been modified */
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.
ERRORS
[EINVAL] addr is not a valid address for user mode.
[EFAULT] an error occurred trying to copy to the output character array vec.
SEE ALSO
madvise(2), minherit(2), mlock(2), mprotect(2), msync(2), munmap(2)
HISTORY
The mincore() function first appeared in 4.4BSD.
BSD
June 9, 1993 BSD