Sponsored Content
Top Forums Shell Programming and Scripting Split large file and add header and footer to each small files Post 302185497 by radoulov on Tuesday 15th of April 2008 05:36:43 AM
Old 04-15-2008
Quote:
Originally Posted by ashish4422
I have one large file, after every 200 line i have to split the file and the add header and footer to each small file?
It is possible to add different header and footer to each file?
Post sample data and example of the desired output.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Splitting large file into small files

Hi, I need to split a large file into small files based on a string. At different palces in the large I have the string ^Job. I need to split the file into different files starting from ^Job to the last character before the next ^Job. Also all the small files should be automatically named.... (4 Replies)
Discussion started by: dncs
4 Replies

2. Shell Programming and Scripting

Split large file and add header and footer to each file

I have one large file, after every 200 line i have to split the file and the add header and footer to each small file? It is possible to add different header and footer to each file? (1 Reply)
Discussion started by: ashish4422
1 Replies

3. Shell Programming and Scripting

Split a file into 16 small files

Hi I want to split a file that has 'n' number of records into 16 small files. Can some one suggest me how to do this using Unix script? Thanks rrkk (10 Replies)
Discussion started by: rrkks
10 Replies

4. Shell Programming and Scripting

script to splite large file to number of small files

Dear All, Could you please help me to split a file contain around 240,000,000 line to 4 files all equally likely , note that we need to maintain that the end of each file should started by start flage (MSISDN) and ended by end flag (End), also the number of the line between the... (10 Replies)
Discussion started by: ahmed.gad
10 Replies

5. Shell Programming and Scripting

How to add header and footer?

Hi, Guys, I want add header and footer in a file. I can add footer using following command: echo "Footer" >>file. I don't know how to add header. Thanks in advance (4 Replies)
Discussion started by: ken002
4 Replies

6. Shell Programming and Scripting

Add header and footer with record count in footer

This is my file(Target.txt) name|age|locaction abc|23|del xyz|24|mum jkl|25|kol The file should be like this 1|03252012 1|name|age|location 2|abc|23|del 2|xyz|24|mum 2|jkl|25|kol 2|kkk|26|hyd 3|4 Column 1 is row indicator for row 1 and 2, column indicator is 1,for data rows... (1 Reply)
Discussion started by: itsranjan
1 Replies

7. Shell Programming and Scripting

Split a large array into small chunks

Hi, I need to split a large array "@sharedArray" into 10 small arrays. The arrays should be like @sharedArray1,@sharedArray2,@sharedArray3...so on.. Can anyone help me with the logic to do so :(:confused: (6 Replies)
Discussion started by: rkrish
6 Replies

8. Shell Programming and Scripting

Breaking large file into small files

Dear all, I have huge txt file with the input files for some setup_code. However for running my setup_code, I require txt files with maximum of 1000 input files Please help me in suggesting way to break down this big txt file to small txt file of 1000 entries only. thanks and Greetings, Emily (12 Replies)
Discussion started by: emily
12 Replies

9. Shell Programming and Scripting

Split large xml into mutiple files and with header and footer in file

Split large xml into mutiple files and with header and footer in file tried below it splits unevenly and also i need help in adding header and footer command : csplit -s -k -f my_XML_split.xml extrfile.xml "/<Document>/" {1} sample xml <?xml version="1.0" encoding="UTF-8"?><Recipient>... (36 Replies)
Discussion started by: karthik
36 Replies

10. UNIX for Beginners Questions & Answers

Split large file into 24 small files on one hour basis

I Have a large file with 24hrs log in the below format.i need to split the large file in to 24 small files on one hour based.i.e ex:from 09:55 to 10:55,10:55-11:55 can any one help me on this.! ... (20 Replies)
Discussion started by: Raghuram717
20 Replies
me(5)                                                   Standards, Environments, and Macros                                                  me(5)

NAME
me - macros for formatting papers SYNOPSIS
nroff -me [options] filename... troff -me [options] filename... DESCRIPTION
This package of nroff and troff macro definitions provides a canned formatting facility for technical papers in various formats. When pro- ducing 2-column output on a terminal, filter the output through col(1). The macro requests are defined below. Many nroff and troff requests are unsafe in conjunction with this package, however, these requests may be used with impunity after the first .pp: .bp begin new page .br break output line here .sp n insert n spacing lines .ls n (line spacing) n=1 single, n=2 double space .na no alignment of right margin .ce n center next n lines .ul n underline next n lines .sz +n add n to point size Output of the eqn(1), neqn(1), refer(1), and tbl(1) preprocessors for equations and tables is acceptable as input. REQUESTS
In the following list, "initialization" refers to the first .pp, .lp, .ip, .np, .sh, or .uh macro. This list is incomplete. Request Initial Cause Explanation Value Break .(c - yes Begin centered block. .(d - no Begin delayed text. .(f - no Begin footnote. .(l - yes Begin list. .(q - yes Begin major quote. .(xx - no Begin indexed item in index x. .(z - no Begin floating keep. .)c - yes End centered block. .)d - yes End delayed text. .)f - yes End footnote. .)l - yes End list. .)q - yes End major quote. .)x - yes End index item. .)z - yes End floating keep. .++ m H - no Define paper section. m defines the part of the paper, and can be C (chapter), A (appen- dix), P (preliminary, for instance, abstract, table of contents, etc.), B (bibliography), RC (chapters renumbered from page one each chapter), or RA (appendix renum- bered from page one). .+c T - yes Begin chapter (or appendix, etc., as set by .++). T is the chapter title. .1c 1 yes One column format on a new page. .2c 1 yes Two column format. .EN - yes Space after equation produced by eqn or neqn. .EQ x y - yes Precede equation; break out and add space. Equation number is y. The optional argument x may be I to indent equation (default), L to left-adjust the equation, or C to center the equation. .GE - yes End gremlin picture. .GS - yes Begin gremlin picture. .PE - yes End pic picture. .PS - yes Begin pic picture. .TE - yes End table. .TH - yes End heading section of table. .TS x - yes Begin table; if x is H table has repeated heading. .ac A N - no Set up for ACM style output. A is the Author's name(s), N is the total number of pages. Must be given before the first initialization. .b x no no Print x in boldface; if no argument switch to boldface. .ba +n 0 yes Augments the base indent by n. This indent is used to set the indent on regular text (like paragraphs). .bc no yes Begin new column. .bi x no no Print x in bold italics (nofill only). .bu - yes Begin bulleted paragraph. .bx x no no Print x in a box (nofill only). .ef 'x'y'z ''''' no Set even footer to x y z. .eh 'x'y'z ''''' no Set even header to x y z. .fo 'x'y'z ''''' no Set footer to x y z. .hx - no Suppress headers and footers on next page. .he 'x'y'z ''''' no Set header to x y z. .hl - yes Draw a horizontal line. .i x no no Italicize x; if x missing, italic text follows. .ip x y no yes Start indented paragraph, with hanging tag x. Indentation is y ens (default 5). .lp yes yes Start left-blocked paragraph. .lo - no Read in a file of local macros of the form .*x. Must be given before initialization. .np 1 yes Start numbered paragraph. .of 'x'y'z ''''' no Set odd footer to x y z. .oh 'x'y'z ''''' no Set odd header to x y z. .pd - yes Print delayed text. .pp no yes Begin paragraph. First line indented. .r yes no Roman text follows. .re - no Reset tabs to default values. .sc no no Read in a file of special charac- ters and diacritical marks. Must be given before initialization. .sh n x - yes Section head follows, font automatically bold. n is level of section, x is title of section. .sk no no Leave the next page blank. Only one page is remembered ahead. .sm x - no Set x in a smaller pointsize. .sz +n 10p no Augment the point size by n points. .th no no Produce the paper in thesis format. Must be given before initializa- tion. .tp no yes Begin title page. .u x - no Underline argument (even in troff). (Nofill only). .uh - yes Like .sh but unnumbered. .xp x - no Print index x. FILES
/usr/share/lib/tmac/e /usr/share/lib/tmac/*.me SEE ALSO
col(1), eqn(1), nroff(1), refer(1), tbl(1), troff(1) SunOS 5.10 25 Feb 1992 me(5)
All times are GMT -4. The time now is 07:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy