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::Vendor(3) libdpkg-perl Dpkg::Vendor(3)NAME
Dpkg::Vendor - get access to some vendor specific information
DESCRIPTION
The files in /etc/dpkg/origins/ can provide information about various vendors who are providing Debian packages. Currently those files look
like this:
Vendor: Debian
Vendor-URL: http://www.debian.org/
Bugs: debbugs://bugs.debian.org
The file should be named according to the vendor name.
FUNCTIONS
$fields = Dpkg::Vendor::get_vendor_info($name)
Returns a Dpkg::Control object with the information parsed from the corresponding vendor file in /etc/dpkg/origins/. If $name is
omitted, it will use /etc/dpkg/origins/default which is supposed to be a symlink to the vendor of the currently installed operating
system. Returns undef if there's no file for the given vendor.
$name = Dpkg::Vendor::get_vendor_file($name)
Check if there's a file for the given vendor and returns its name.
$name = Dpkg::Vendor::get_current_vendor()
Returns the name of the current vendor. If DEB_VENDOR is set, it uses that first, otherwise it falls back to parsing
/etc/dpkg/origins/default. If that file doesn't exist, it returns undef.
$object = Dpkg::Vendor::get_vendor_object($name)
Return the Dpkg::Vendor::* object of the corresponding vendor. If $name is omitted, return the object of the current vendor. If no
vendor can be identified, then return the Dpkg::Vendor::Default object.
Dpkg::Vendor::run_vendor_hook($hookid, @params)
Run a hook implemented by the current vendor object.
1.16.0.3 2012-04-17 Dpkg::Vendor(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)