hi,
I have a 20 line file.
I need a command which will brinf back a specific line based upon the line number I enter.
e.g. the file looks like this and is called file1
jim is a man
john is a woman
james is a man
wendy is a woman
lesley is a woman
i want a command that will... (4 Replies)
I need to get a section of a file based on 2 params. I want the part of the file between param 1 & 2. I have tried a bunch of ways and just can't seem to get it right. Can someone please help me out.....its much appreciated. Here is what I have found that looks like what I want....but doesn't... (12 Replies)
Aloha! I have just over 1k of users that have permissions that they shouldn't under our system. I need to parse a provided list of usernames, check their permissions file, and strip the permissions that they are not allowed to have. If upon the permissions strip they are left with no permissions,... (6 Replies)
Hi,
I understand either AWK or SED can do this, but I not sure how to extract the following configuration in section. Meaning when I need to find code with " ip helper-address 192.168.11.2" , it would start from "interface Serial0/0" and "interface FastEthernet0/1". Only displaying both section... (2 Replies)
Is there an awk, sed, vi or any line command that adds Field Separators (default spaces) to each line in a file?
$cat RegionalData
12FC2525MZLP8266900216
12FC2525MZLP8266900216
12FC2525NBLP8276900216
12FC2525NBLP8276900216
Desired results:
1 2 F C 2525 MZ LP 826 690 02 16
1 2 F C... (2 Replies)
I have searched in a variety of ways in a variety of places but have come up empty.
I would like to prepend a portion of a section header to each following line until the next section header. I have been using sed for most things up until now but I'd go for a solution in just about anything--... (7 Replies)
I can obtain information from itdt inventory command however it display as below, I'd like to print each entity on one line but seperated by :
the file is something like and each section ends with Volume Tag
Drive Address 256
Drive State ................... Normal
ASC/ASCQ... (3 Replies)
In the awk below I am trying to parse the Sample Name below the section. The values that are extracted are read into array s(each value in a row seperated by a space) which will be used later in a bash script. The awk does execute but no values are printed. I am also not sure how to print in a row... (1 Reply)
Hi Gurus,
I have below file which has different sections, need to move the sections to beginning of the each record.
original file
aaa
bbb
ccc
ddd
eee
fff
output file.
aaa
bbb
ccc
ddd
eee
fff (6 Replies)
Discussion started by: green_k
6 Replies
LEARN ABOUT DEBIAN
svn::hooks::updateconffile
SVN::Hooks::UpdateConfFile(3pm) User Contributed Perl Documentation SVN::Hooks::UpdateConfFile(3pm)NAME
SVN::Hooks::UpdateConfFile - Maintain the repository configuration versioned.
VERSION
version 1.19
SYNOPSIS
This SVN::Hooks plugin allows you to maintain the repository configuration files under version control.
The repository configuration is usually kept in the directory "conf" under the directory where the repository was created. In a brand new
repository you see there the files "authz", "passwd", and "svnserve.conf". It's too bad that these important files are usually kept out of
any version control system. This plugin tries to solve this problem allowing you to keep these files versioned under the same repository
where they are used.
It's active in the "pre-commit" and the "post-commit" hooks.
It's configured by the following directive.
UPDATE_CONF_FILE(FROM, TO, @ARGS)
This directive tells that after a successful commit the file FROM, kept under version control, must be copied to TO.
FROM can be a string or a qr/Regexp/ specifying the file path relative to the repository's root (e.g. "trunk/src/version.c" or
"qr:^conf/(w+).conf$:").
TO is a path relative to the "/repo/conf" directory in the server. It can be an explicit file name or a directory, in which case the
basename of FROM is used as the name of the destination file.
If FROM is a qr/Regexp/, TO is evaluated as a string in order to allow for the interpolation of capture buffers from the regular
expression. This is useful to map the copy operation to a diferent directory structure. For example, this configuration
"qr:^conf/(w+).conf$: => '$1.conf'" updates any .conf file in the repository conf directory.
The optional @ARGS must be a sequence of pairs like these:
validator => ARRAY or CODE
A validator is a function or a command (specified by an array of strings that will be passed to the shell) that will check the contents
of FROM in the pre-commit hook to see if it's valid. If there is no validator, the contents are considered valid.
The function receives three arguments:
A string with the contents of FROM
A string with the relative path to FROM in the repository
An SVN::Look object representing the commit transaction
The command is called with three arguments:
The path to a temporary copy of FROM
The relative path to FROM in the repository
The path to the root of the repository in the server
generator => ARRAY or CODE
A generator is a function or a command (specified by an array of strings that will be passed to the shell) that will transform the
contents of FROM in the post-commit hook before copying it to TO. If there is no generator, the contents are copied as is.
The function receives the same three arguments as the validator's function above.
The command is called with the same three arguments as the validator's command above.
actuator => ARRAY or CODE
An actuator is a function or a command (specified by an array of strings that will be passed to the shell) that will be invoked after a
successful commit of FROM in the post-commit hook.
The function receives the same three arguments as the validator's function above.
The command is called with the same three arguments as the validator's command above.
rotate => NUMBER
By default, after each successful commit the TO file is overwriten by the new contents of FROM. With this option, the last NUMBER
versions of TO are kept on disk with numeric suffixes ranging from .0 to ".NUMBER-1". This can be useful, for instance, in case you
manage to commit a wrong authz file that denies any subsequent commit.
UPDATE_CONF_FILE(
'conf/authz' => 'authz',
validator => ['/usr/local/bin/svnauthcheck'],
generator => ['/usr/local/bin/authz-expand-includes'],
actuator => ['/usr/local/bin/notify-auth-change'],
rotate => 2,
);
UPDATE_CONF_FILE(
'conf/svn-hooks.conf' => 'svn-hooks.conf',
validator => [qw(/usr/bin/perl -c)],
actuator => sub {
my ($contents, $file) = @_;
die "Can't use Gustavo here." if $contents =~ /gustavo/;
},
rotate => 2,
);
UPDATE_CONF_FILE(
qr:/file(
+)$:' => 'subdir/$1/file',
rotate => 2,
);
AUTHOR
Gustavo L. de M. Chaves <gnustavo@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by CPqD.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-24 SVN::Hooks::UpdateConfFile(3pm)