9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Everyone,
I need a little help in manipulating a file. This is what I need.
I need to move each line barring the top 3 lines, to the right by a 8 (or some specified number ) of places.
Example BEGIN:
Vertices
Edges
Archs
1443 4042
862 4821
254 1177I want to move the... (3 Replies)
Discussion started by: scigeek
3 Replies
2. Shell Programming and Scripting
My data is something like shown below.
date1 date2 aaa bbbb ccccc
date3 date4 dddd eeeeeee ffffffffff ggggg hh
I want the output like this
date1date2 aaa eeeeee
I serached in the forum but didn't find the exact matching solution. Please help. (7 Replies)
Discussion started by: rdhanek
7 Replies
3. Shell Programming and Scripting
Dear Friends,
I have a script below mentioned, it is running OK on Linux platform but somehow now i have to use SOLARIS 10 for this script, When i run this script i have some error messages also given below.
Can any of you help me with this, i will be very thankful to him.
... (6 Replies)
Discussion started by: Danish Shakil
6 Replies
4. Linux
Hi,
please suggest me the possible reasons for application to get hang ????
Thanks and Regards
Anand P (1 Reply)
Discussion started by: Anand Prakash
1 Replies
5. UNIX and Linux Applications
Hi,
please suggest me the possible reasons for application to get hang ????
Thanks and Regards
Anand P (0 Replies)
Discussion started by: Anand Prakash
0 Replies
6. Solaris
Hi,
Iam relatively new to Shell scripting.
............
.........
Cur_log_file=`ls -lrt LOGFILE* | grep 'Jun 30' | tail -1`
...............
..................
Iam trying to find some log file name to check their status, using above script line.
If the log file is not avaible then rest of... (3 Replies)
Discussion started by: Lokesha
3 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
Please help me in the following query
need a command to get all the files in the present directory except the next day file
format :: abc_<DD>.log
$ls -l
abc_10.log
abc_10.log
abc_11.log
Now i need the output in abc.list which should contains
$more abc.list
abc_10.log... (5 Replies)
Discussion started by: thaduka
5 Replies
8. Programming
hi i am new to c programming and found this on the net could someone tell me what it actually does, many thanks in advance cheers
#include <fcntl.h>
main()
{
int fd;
fd = open("in1", O_RDONLY);
printf("%d\n", fd);
}
and this too please
#include <fcntl.h>
main()
{
int... (1 Reply)
Discussion started by: ruffenator
1 Replies
9. UNIX for Dummies Questions & Answers
I am new to unix, and have just taken over maintenance/admin of a unix system. I am trying to restore a full backup of one of the consoles on the system. The tape backup device appears to be recognized as it is an option to restore from. After choosing the tape backup and loading the tape, a... (3 Replies)
Discussion started by: ecoli69
3 Replies
Net::DNS::ZoneFile(3) User Contributed Perl Documentation Net::DNS::ZoneFile(3)
NAME
Net::DNS::ZoneFile - DNS zone file
SYNOPSIS
use Net::DNS::ZoneFile;
$zonefile = new Net::DNS::ZoneFile( 'named.example' );
while ( $rr = $zonefile->read ) {
$rr->print;
}
@zone = $zonefile->read;
DESCRIPTION
Each Net::DNS::ZoneFile object instance represents a zone file together with any subordinate files introduced by the $INCLUDE directive.
Zone file syntax is defined by RFC1035.
A program may have multiple zone file objects, each maintaining its own independent parser state information.
The parser supports both the $TTL directive defined by RFC2308 and the BIND $GENERATE syntax extension.
All RRs in a zone file must have the same class, which may be specified for the first RR encountered and is then propagated automatically
to all subsequent records.
METHODS
new
$zonefile = new Net::DNS::ZoneFile( 'filename', ['example.com'] );
$handle = new FileHandle( 'filename', '<:encoding(ISO8859-7)' );
$zonefile = new Net::DNS::ZoneFile( $handle, ['example.com'] );
The new() constructor returns a Net::DNS::ZoneFile object which represents the zone file specified in the argument list.
The specified file or file handle is open for reading and closed when exhausted or all references to the ZoneFile object cease to exist.
The optional second argument specifies $ORIGIN for the zone file.
Character encoding is specified indirectly by creating a FileHandle with the desired encoding layer, which is then passed as an argument to
new(). The specified encoding is propagated to files introduced by $include directives.
read
$rr = $zonefile->read;
@rr = $zonefile->read;
When invoked in scalar context, read() returns a Net::DNS::RR object representing the next resource record encountered in the zone file, or
undefined if end of data has been reached.
When invoked in list context, read() returns the list of Net::DNS::RR objects in the order that they appear in the zone file.
Comments and blank lines are silently disregarded.
$INCLUDE, $ORIGIN, $TTL and $GENERATE directives are processed transparently.
name
$filename = $zonefile->name;
Returns the name of the zone file from which RRs will be read. $INCLUDE directives will cause this to differ from the filename argument
supplied when the object was created.
line
$line = $zonefile->line;
Returns the number of the last line read from the current zone file.
origin
$origin = $zonefile->origin;
Returns the fully qualified name of the current origin within the zone file.
ttl
$ttl = $zonefile->ttl;
Returns the default TTL as specified by the $TTL directive.
COMPATIBILITY WITH Net::DNS::ZoneFile 1.04
Applications which depended on the defunct Net::DNS::ZoneFile 1.04 CPAN distribution will continue to operate with minimal change using the
compatibility interface described below.
use Net::DNS::ZoneFile;
$listref = Net::DNS::ZoneFile->read( $filename, $include_dir );
$listref = Net::DNS::ZoneFile->readfh( $handle, $include_dir );
$listref = Net::DNS::ZoneFile->parse( $string, $include_dir );
$listref = Net::DNS::ZoneFile->parse( $string, $include_dir );
$_->print for @$listref;
The optional second argument specifies the default path for filenames. The current working directory is used by default.
Although not available in the original implementation, the RR list can be obtained directly by calling any of these methods in list
context.
@rr = Net::DNS::ZoneFile->read( $filename, $include_dir );
read
$listref = Net::DNS::ZoneFile->read( $filename, $include_dir );
@rr = Net::DNS::ZoneFile->read( $filename, $include_dir );
read() parses the specified zone file and returns a reference to the list of Net::DNS::RR objects representing the RRs in the file. The
return value is undefined if the zone data can not be parsed.
When called in list context, the partial result is returned if an error is encountered by the parser.
readfh
$listref = Net::DNS::ZoneFile->readfh( $handle, $include_dir );
readfh() parses data from the specified file handle and returns a reference to the list of Net::DNS::RR objects representing the RRs in the
file.
parse
$listref = Net::DNS::ZoneFile->parse( $string, $include_dir );
$listref = Net::DNS::ZoneFile->parse( $string, $include_dir );
parse() interprets the zone file text in the argument string and returns a reference to the list of Net::DNS::RR objects representing the
RRs.
ACKNOWLEDGEMENTS
This package is designed as an improved and compatible replacement for Net::DNS::ZoneFile 1.04 which was created by Luis Munoz in 2002 as a
separate CPAN module.
The present implementation is the result of an agreement to merge our two different approaches into one package integrated into Net::DNS.
The contribution of Luis Munoz is gratefully acknowledged.
Thanks are also due to Willem Toorop for his constructive criticism of the initial version and invaluable assistance during testing.
COPYRIGHT
Copyright (c)2011-2012 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, Net::DNS, Net::DNS::RR, RFC1035 Section 5.1, RFC2308, BIND 9 Administrator Reference Manual
perl v5.18.2 2014-01-16 Net::DNS::ZoneFile(3)