02-15-2012
Header and Footer...
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 records and I need to verify that data records should be equal to Footer records, if it is not equal stop the process.
Hope I have explained my problem .
Experts please help me to resolve this issue.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: seaky
2 Replies
2. Shell Programming and Scripting
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)
Discussion started by: digitalrg
4 Replies
3. Shell Programming and Scripting
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
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: Sunny_teotia
5 Replies
5. UNIX for Dummies Questions & Answers
I want to delete the header and footer in the file by using sed for that i ran the below script and my text file looks like
emp.txt
# This file contain employee
# information
abc 12300 34 'FGH'
# This is confidential as per the firm rules.
my intention is to remove the header... (8 Replies)
Discussion started by: vmachava
8 Replies
6. 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
7. Shell Programming and Scripting
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
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. Programming
it still display header and footer
header
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 24 13:41:51 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real... (0 Replies)
Discussion started by: ment0smintz
0 Replies
10. Shell Programming and Scripting
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 SUSE
net::dns::header
Net::DNS::Header(3) User Contributed Perl Documentation Net::DNS::Header(3)
NAME
Net::DNS::Header - DNS packet header class
SYNOPSIS
"use Net::DNS::Header;"
DESCRIPTION
A "Net::DNS::Header" object represents the header portion of a DNS packet.
METHODS
new
$header = Net::DNS::Header->new;
"new" creates a header object appropriate for making a DNS query.
parse
($header, $offset) = Net::DNS::Header->parse($data);
Parses the header record at the start of a DNS packet. The argument is a reference to the packet data.
Returns a Net::DNS::Header object and the offset of the next location in the packet.
Parsing is aborted if the header object cannot be created (e.g., corrupt or insufficient data).
print
$header->print;
Prints the header record on the standard output.
string
print $header->string;
Returns a string representation of the header object.
id
print "query id = ", $header->id, "
";
$header->id(1234);
Gets or sets the query identification number.
qr
print "query response flag = ", $header->qr, "
";
$header->qr(0);
Gets or sets the query response flag.
opcode
print "query opcode = ", $header->opcode, "
";
$header->opcode("UPDATE");
Gets or sets the query opcode (the purpose of the query).
aa
print "answer is ", $header->aa ? "" : "non-", "authoritative
";
$header->aa(0);
Gets or sets the authoritative answer flag.
tc
print "packet is ", $header->tc ? "" : "not ", "truncated
";
$header->tc(0);
Gets or sets the truncated packet flag.
rd
print "recursion was ", $header->rd ? "" : "not ", "desired
";
$header->rd(0);
Gets or sets the recursion desired flag.
cd
print "checking was ", $header->cd ? "not" : "", "desired
";
$header->cd(0);
Gets or sets the checking disabled flag.
ra
print "recursion is ", $header->ra ? "" : "not ", "available
";
$header->ra(0);
Gets or sets the recursion available flag.
ad
print "The result has ", $header->ad ? "" : "not", "been verified
"
Relevant in DNSSEC context.
(The AD bit is only set on answers where signatures have been cryptographically verified or the server is authoritative for the data and is
allowed to set the bit by policy.)
rcode
print "query response code = ", $header->rcode, "
";
$header->rcode("SERVFAIL");
Gets or sets the query response code (the status of the query).
qdcount, zocount
print "# of question records: ", $header->qdcount, "
";
$header->qdcount(2);
Gets or sets the number of records in the question section of the packet. In dynamic update packets, this field is known as "zocount" and
refers to the number of RRs in the zone section.
ancount, prcount
print "# of answer records: ", $header->ancount, "
";
$header->ancount(5);
Gets or sets the number of records in the answer section of the packet. In dynamic update packets, this field is known as "prcount" and
refers to the number of RRs in the prerequisite section.
nscount, upcount
print "# of authority records: ", $header->nscount, "
";
$header->nscount(2);
Gets or sets the number of records in the authority section of the packet. In dynamic update packets, this field is known as "upcount" and
refers to the number of RRs in the update section.
arcount, adcount
print "# of additional records: ", $header->arcount, "
";
$header->arcount(3);
Gets or sets the number of records in the additional section of the packet. In dynamic update packets, this field is known as "adcount".
data
$hdata = $header->data;
Returns the header data in binary format, appropriate for use in a DNS query packet.
COPYRIGHT
Copyright (c) 1997-2002 Michael Fuhr.
Portions Copyright (c) 2002-2004 Chris Reinhardt.
Portions Copyright (c) 2007 Dick Franks.
All rights reserved. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
perl(1), Net::DNS, Net::DNS::Resolver, Net::DNS::Packet, Net::DNS::Update, Net::DNS::Question, Net::DNS::RR, RFC 1035 Section 4.1.1
perl v5.12.1 2009-12-30 Net::DNS::Header(3)