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
LEARN ABOUT DEBIAN
courriel::header
Courriel::Header(3pm) User Contributed Perl Documentation Courriel::Header(3pm)
NAME
Courriel::Header - A single header's name and value
VERSION
version 0.29
SYNOPSIS
my $subject = $headers->get('subject');
print $subject->value();
DESCRIPTION
This class represents a single header, which consists of a name and value.
API
This class supports the following methods:
Courriel::Header->new( ... )
This method requires two attributes, "name" and "value". Both must be strings. The "name" cannot be empty, but the "value" can.
$header->name()
The header name as passed to the constructor.
$header->value()
The header value as passed to the constructor.
$header->as_string( charset => $charset )
Returns the header name and value with any necessary MIME encoding and folding.
The "charset" parameter specifies what character set to use for MIME-encoding non-ASCII values. This defaults to "utf8". The charset name
must be one recognized by the Encode module.
$header->stream_to( output => $output, charset => ... )
This method will send the stringified header to the specified output. The output can be a subroutine reference, a filehandle, or an object
with a "print()" method. The output may be sent as a single string, as a list of strings, or via multiple calls to the output.
See the "as_string()" method for documentation on the "charset" parameter.
ROLES
This class does the "Courriel::Role::Streams" role.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2012 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
perl v5.14.2 2012-03-07 Courriel::Header(3pm)