04-13-2010
Removing Header from files before Concatenation
I need to concatenate the files of same type but with different names that conatin header. Before conactenating its mandatory to remove the header from the files ..
and after concatenation the output file should contain header too.
how to do it...
thanks in advance.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Dear All
I am using cat command for concatenating multiple files. Some time i also use append command when there are few files.
Is there faster way of concatenating multiple files(60 to 70 files) each of
156 MB or less/more.:)
Thanx (1 Reply)
Discussion started by: tkbharani
1 Replies
2. Shell Programming and Scripting
Hi ,
I am having a file 1n.txt -
cat 1n.txt gives
get_next_sp_fixing_mod_ref_no,
get_next_sp_tran_ref_no,
cat 2n.txt -
boxer1.cpp
boxer2.cpp
I want a file resn.txt which has -
get_next_sp_fixing_mod_ref_no,boxer1.cpp
get_next_sp_tran_ref_no,boxer2.cpp
How can i do that ? Its... (3 Replies)
Discussion started by: sid1582
3 Replies
3. UNIX for Dummies Questions & Answers
I have the following snippet to concatenate about a hundred csv-files:
for file in *csv; do cat $file >> newfile; done
This line works, but before I was experimenting with the following line, which is more intuitive and is a tad more robust:
for file in *.csv; do cat $file >> newfile; done
Can... (2 Replies)
Discussion started by: figaro
2 Replies
4. Shell Programming and Scripting
Hi All,
I am karthik. I am new to this forum. I have one requirement.
I have a file with header and footer.
Header may be like
HDR0001
or
FILE20090110
(Assume it is unknown so far, but i am sure there is a header in the file)
likewise file has the trailer too.
I just... (7 Replies)
Discussion started by: karthi_gana
7 Replies
5. Shell Programming and Scripting
Hellow i have a large number of files that i want to concatenate to one. these files start with the word 'VOICE_' for example
VOICE_0000000000
VOICE_1223o23u0
VOICE_934934927349
I use the following code:
cat /ODS/prepaid/CDR_FLOW/MEDIATION/VOICE_* >> /ODS/prepaid/CDR_FLOW/WORK/VOICE
... (10 Replies)
Discussion started by: chriss_58
10 Replies
6. UNIX for Dummies Questions & Answers
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies
7. Shell Programming and Scripting
I have two files which are getting sent to a UNIX server in order to be bcp'd into a database. The bcp is failing because there's a header and footer row on the file which give the date of the file and the number of rows in it. That's because the file is also being used for another process, so we... (1 Reply)
Discussion started by: Tom Sawyer
1 Replies
8. Shell Programming and Scripting
Hi Every one,
what is the coomand to remove header or footer from a file.
Please help me by providing command/syntax to remove header/footer from unix.
Thanks in advance for all your support. (5 Replies)
Discussion started by: sridhardwh
5 Replies
9. UNIX for Advanced & Expert Users
I have a EBCDIC multi layout file which has a header record which is 21 bytes, The Detail records are 2427 bytes long and the trailer record is 9 bytes long.
Is there a command to remove the header as well as trailer record and read only the detail records while at the same time not altering... (1 Reply)
Discussion started by: abhilashnair
1 Replies
10. Shell Programming and Scripting
Since my last threads were closed on account of spamming, keeping just this one opened!
Hi,
I have the following reports that get generated every 1 hour and this is my requirement:
1. 5 reports get generated every hour with the names
"Report.Dddmmyy.Thhmiss.CTLR"... (5 Replies)
Discussion started by: Jesshelle David
5 Replies
g3cat(1) mgetty+sendfax manual g3cat(1)
NAME
g3cat - concatenate multiple g3 documents
SYNOPSIS
g3cat [-l] [-a] g3-file1 ...
DESCRIPTION
g3cat concatenates g3 files. These can either be 'raw', that is, bitmaps packed according to the CCITT T.4 standard for one-dimensional
bitmap encoding, or 'digifax' files, created by GNU's GhostScript package with the digifax drivers. Its output is a concatenation of all
the input files, in raw G3 format, with two white lines in between.
If a - is given as input file, stdin is used.
If the input data is malformed, a warning is printed to stderr, and the output file will have a blank line at this place.
OPTIONS
-a byte-align the end-of-line codes (EOL) in the file. Every EOL will end at a byte boundary, that is, with a 01 byte.
-l separate files with a one-pixel wide black line.
-h <blank lines>
specifies the number of blank lines g3cat should prepend to each page. Default is 0.
-w <width>
specifies the desired page width in pixels per line. Default is 1728 PELs, and this is mandatory if you want to send the fax to a
standard fax machine. If one of the input files doesn't match this line width (for example because it was created by a broken G3
creator), a warning is printed, and the line width is transparently fixed.
Example
The following example will put a header line on a given g3 page, 'page1' and put the result into 'page2':
echo '$header' | pbmtext | pbm2g3 | g3cat - page1 >page2
FILES
--
BUGS
Hopefully none :-).
SEE ALSO
g32pbm(1), sendfax(8), faxspool(1)
AUTHORS
g3cat is Copyright (C) 1993 by Gert Doering, <gert@greenie.muc.de>
greenie 27 Oct 93 g3cat(1)