Dpkg::Conf(3) libdpkg-perl Dpkg::Conf(3)NAME
Dpkg::Conf - parse dpkg configuration files
DESCRIPTION
The Dpkg::Conf object can be used to read options from a configuration file. It can exports an array that can then be parsed exactly like
@ARGV.
FUNCTIONS
my $conf = Dpkg::Conf->new(%opts)
Create a new Dpkg::Conf object. Some options can be set through %opts: if allow_short evaluates to true (it defaults to false), then
short options are allowed in the configuration file, they should be prepended with a single dash.
@$conf
@options = $conf->get_options()
Returns the list of options that can be parsed like @ARGV.
$conf->load($file)
Read options from a file. Return the number of options parsed.
$conf->parse($fh)
Parse options from a file handle. Return the number of options parsed.
$conf->filter(remove => $rmfunc)
$conf->filter(keep => $keepfunc)
Filter the list of options, either removing or keeping all those that return true when &$rmfunc($option) or &keepfunc($option) is
called.
$string = $conf->output($fh)
Write the options in the given filehandle (if defined) and return a string representation of the content (that would be) written.
"$conf"
Return a string representation of the content.
$conf->save($file)
Save the options in a file.
AUTHOR
Raphael Hertzog <hertzog@debian.org>.
1.16.0.3 2012-04-17 Dpkg::Conf(3)
Check Out this Related Man Page
Dpkg::Control::Info(3) libdpkg-perl Dpkg::Control::Info(3)NAME
Dpkg::Control::Info - parse files like debian/control
DESCRIPTION
It provides an object to access data of files that follow the same syntax than debian/control.
FUNCTIONS
$c = Dpkg::Control::Info->new($file)
Create a new Dpkg::Control::Info object for $file. If $file is omitted, it loads debian/control. If file is "-", it parses the standard
input.
$c->reset()
Resets what got read.
$c->load($file)
Load the content of $file. Exits in case of errors. If file is "-", it loads from the standard input.
$c->parse($fh, $description)
Parse a control file from the given filehandle. Exits in case of errors. $description is used to describe the filehandle, ideally it's
a filename or a description of where the data comes from. It's used in error messages.
$c->[0]
$c->get_source()
Returns a Dpkg::Control object containing the fields concerning the source package.
$c->get_pkg_by_idx($idx)
Returns a Dpkg::Control object containing the fields concerning the binary package numbered $idx (starting at 1).
$c->get_pkg_by_name($name)
Returns a Dpkg::Control object containing the fields concerning the binary package named $name.
$c->get_packages()
Returns a list containing the Dpkg::Control objects for all binary packages.
$c->output($filehandle)
Dump the content into a filehandle.
"$c"
Return a string representation of the content.
@{$c}
Return a list of Dpkg::Control objects, the first one is corresponding to source information and the following ones are the binary
packages information.
AUTHOR
Raphael Hertzog <hertzog@debian.org>.
1.16.0.3 2012-04-17 Dpkg::Control::Info(3)
is there any way to remove " from the string within the line , keeping the content same.
lets say may file is test.csv
and data with in this :
"25Jul06,31Jul06,A"
"8,260C,700C,GBP,46090.46,,700C55815009251260C,30Jul06,,,SGD,135045.05,2.9300000,01,1"... (6 Replies)
Hi,
During the Initial startup of the Linux machine.
Grub.conf has a entry to mount the root partition as read only after the initialistation of the Kernel.
Is there any specific reason for this or the root partition can be made to mounted with read write options.
Regards
Arun (1 Reply)
How the below ex.txt file can be parsed using starting bracket'(' and ending bracket')' and hav to store the values without quotes in a text file.
There will be some 10 or 20 lines inbetween starting brakcet and ending bracket at first there may be 5 words,2ndl ine only 1 word, third line 6... (3 Replies)
Hi,
Lets say I have a script which reads a conf file (say MASTERFILE) line by line to fetch file_name, source_path, dest_path. But currently, here the file name are static for eg: ABC.txt or XYZ.txt. So i have hard-coded in the conf file.
So what happens that the script picks up the file_name... (1 Reply)
Hi Admins,
I am new member here.
I am using IAX 5.3 trying to configure snmpv3.
Conf file /etc/snmpdv3.conf contents given below
VACM_GROUP group1 SNMPv1 public -
VACM_GROUP group1 SNMPv1 sbmviking -
VACM_VIEW defaultView internet - included -... (0 Replies)
So I have a bunch of strings in a file.
Example Line
./prcol/trt/conf/conf-app/jobdefinition/trt-pre-extr-trt-step.jdef
Intended Result
pre-extr-trt-step
So far I have parsed it out to the last bit,
echo $line | cut -d'/' -f7 | cut -d. -f1Result
trt-pre-extr-trt-step
So I added a... (2 Replies)