In the bash below I am trying to loop through all the R1.gz in a directory (always 1), store them in ARRAY, and cut them before the second _. That is being done but I can't seem to print then one a single line seperated by a space. Is the below the best way or is there a better solution? Thank you .
Hello,
I have two files that I need to compare and print out the line from file2 that has the first 6 fields matching the first 6 fields in file1. Complicating this are the following restrictions
1. file1 is only a few thousand lines at most and file2 is greater than 2 million
2. I need to... (7 Replies)
Hello,
I have 800 or so files with 3 columns each and >10000 lines each.
For each file and each line I would like to print the maximum column number for each line. Then I would like to 'paste' each of these files together (column-wise) so that the file with expression in label '_1' is the... (6 Replies)
I am trying to loop through folders and extract the name of the lowest level subfolder
I was running the script below, it returns
/bb/bin/prd/newyork
/bb/bin/prd/london
/bb/bin/prd/tokyo
I really want
newyork
london
tokyo
I couldn't find a standard variable for the lowest level... (1 Reply)
Hi ,
i want to print the output in line by line
while read LINE
do
echo $LINE | grep UCM | egrep '(Shutdown|Unavailable)'
echo $LINE | grep SRBr | egrep '(Shutdown|Unavailable)'
echo $LINE | grep SRP| egrep '(Shutdown|Unavailable)'
echo $LINE | grep OM | grep JMS|... (7 Replies)
Hi,
I am trying to print copy percentage completion dynamically by using the script below,
#!/bin/bash
dest_size=0
orig_size=`du -sk $sourcefile | awk '{print $1}'`
while ; do
dest_size=`du -sk $destfile | awk '{print $1}'`
coyp_percentage=`echo "scale=2; $dest_size*100/$orig_size"... (4 Replies)
Hi All,
i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field.
i am using centos 7 Operating system.
want to read below file.
# cat /tmp/d5
NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Currently using below script but echo it print the output in two line.
Input file all-vm-final-2.txt
CEALA08893 SDDC_SCUN DS_SIO_Workload_SAPUI_UAT_01 4
CEALA09546 SDDC_SCUN DS-SIO-PD5_Workload_UAT_SP1_Flash_07 4
CEALA09702 SDDC_SCUN DS-VSAN-RMP-WORKLOAD01 4
DEALA08762 SDDC_LDC... (3 Replies)
Discussion started by: ranjancom2000
3 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)