Really Excellent logic when I have seen your code. Thank you very much for your time and for your thoughts.
I have modified the logic accordingly and below is the code:
After running the code I have found that there are 4 lines in between the data records that are differentiate the data.
i.e.
As above we can see that these 4 lines are invalid records.
Now, while calculating the Rowcount we need to ignore these 4 records. i.e.
Here while calculating the rowcount and substituting the new count, we have to ignore the above 4 lines(records).
May be reducing the array by 4. not sure though.
How can we reduce the row count by 4 so that we can get the actual count.
Really appreciate your time and thoughts.
---------- Post updated at 01:40 PM ---------- Previous update was at 01:24 PM ----------
Finally,
I did the following :
Thanks a lot Yazu. I am really Very much thankful to you.
I would like to remove some lines from begining of file (header) and some lines from end of file (footer).
The header/footer lines generated by web-browser when the user upload a file to my webserver.
Example:
-----------------------------7d62af20c052c
Content-Disposition: form-data;... (2 Replies)
Hi Gurus,
My requirement is, I am passing a file1.dat into this(rowcnt.sh) script,but returning a wrong value of -2.(it should be 4).Becoz my file1.dat contains 6records incl: Header & Footer.(6-2=4)
wrong output:
-------
#sh rowcnt.sh file1.dat
-2 actual_cnt except HDR & FTR
should be:... (3 Replies)
Hi All,
I have several txt files i need to enter specific header and footer (both are separate) to all these files how can i do this? plz help..
Regards,
Raghav (4 Replies)
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)
Hi,
I need to check whether the incoming file has a header and footer using a UNIX script. The pattern of the header and footer is fixed as follows:
Header: Name,Date
Footer: Count, Total
Name,Date
-------------------------
-------------------------
-------------------------
Count,... (5 Replies)
Hi,
TASK 1:
I have been using this code to print the information of files kept at "/castor/cern.ch/user/s/sudha/forPooja" in some text file name FILE.txt.
rfdir /castor/cern.ch/user/s/sudha/forPooja | grep data | awk '{print "rfio:///castor/cern.ch/user/s/sudha/forPooja/"$9}' > FILE.txt
... (6 Replies)
Hi All,
I need to write a script that In my file I have to check header and footer records are available or not. If it is available I have to run the script, otherwise I should not. But current script it is checking only the data inside the script. It is avoiding to check Header and Footer... (1 Reply)
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)
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)
Hi I have below requirements on the script below :
(1) I receive 2 pipe seperated file called OUT.psv and DIFF.psv with a column header.I concatenate the 2 files and create a final.psv file. I want to add another header as START_FILE to the final.psv file . How to achieve this ?
(2) I have... (5 Replies)
Discussion started by: samrat dutta
5 Replies
LEARN ABOUT DEBIAN
email::simple::header
Email::Simple::Header(3pm) User Contributed Perl Documentation Email::Simple::Header(3pm)NAME
Email::Simple::Header - the header of an Email::Simple message
SYNOPSIS
my $email = Email::Simple->new($text);
my $header = $email->head;
print $header->as_string;
DESCRIPTION
This method implements the headers of an Email::Simple object. It is a very minimal interface, and is mostly for private consumption at
the moment.
METHODS
new
my $header = Email::Simple::Header->new($head, \%arg);
$head is a string containing a valid email header, or a reference to such a string. If a reference is passed in, don't expect that it
won't be altered.
Valid arguments are:
crlf - the header's newline; defaults to CRLF
as_string
my $string = $header->as_string(\%arg);
This returns a stringified version of the header.
header_names
This method returns the unique header names found in this header, in no particular order.
header_pairs
This method returns all the field/value pairs in the header, in the order that they appear in the header.
header
my $first_value = $header->header($field);
my @all_values = $header->header($field);
This method returns the value or values of the given header field. If the named field does not appear in the header, this method returns
false.
header_set
$header->header_set($field => @values);
This method updates the value of the given header. Existing headers have their values set in place. Additional headers are added at the
end. If no values are given to set, the header will be removed from to the message entirely.
crlf
This method returns the newline string used in the header.
PERL EMAIL PROJECT
This module is maintained by the Perl Email Project
<http://emailproject.perl.org/>
COPYRIGHT AND LICENSE
Copyright 2006-2007 by Ricardo SIGNES
Copyright 2004 by Casey West
Copyright 2003 by Simon Cozens
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2011-12-23 Email::Simple::Header(3pm)