11-23-2016
xfer#xx is only option that I am sure will be accounted for here to check the file transfer count.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I want to read a file line by line and search for a particular string in each line(say for example string containing @ )and save that string into a variable.
Can someone suggest me the way to implement it.I am using K- shell
Thanks
Ishita (5 Replies)
Discussion started by: Ishita
5 Replies
2. Shell Programming and Scripting
For a Script I need to detemine which field of the unix environment variable SHLIB_PATH has the
WALTDB entry.
export SHLIB_PATH=/usr/user5/WALTDB/oracle/product/10.2.0/lib32:/usr/TZD/bin.wdad/mug/oracle/lib:
echo $SHLIB_PATH | awk -F: '{ print $1 }'
Shure gives me the first entry, but... (6 Replies)
Discussion started by: sdohn
6 Replies
3. Shell Programming and Scripting
guys,
I need to know how to assing pattern matched string as an input command variable. Here it goes'
My script is something like this.
./routing.sh <Server> <enable|disable>
## This Script takes an input <Server> variable from this line of the script ##
echo $1 | egrep... (1 Reply)
Discussion started by: raghunsi
1 Replies
4. Shell Programming and Scripting
I want to replace a certain pattern with the variable already defined.
e.g.
set path_verilog = /home/priya/bin/verilogfile
my file contents are :
verilog new
verilog is defined here verilog_path_comes
I am using the below command
sed 's/verilog_path_comes/'$path_verilog'/g' <filename>... (2 Replies)
Discussion started by: nehashine
2 Replies
5. Shell Programming and Scripting
Im trying to parse ifconfig with awk and setup a bunch of variables in one shot. But Im having trouble figuring out how to work with data in previous lines.
ifconfig output:
eth0 Link encap:Ethernet HWaddr 00:50:DA:10:7F:1B
inet addr:10.10.10.10 Bcast:10.10.10.127 ... (0 Replies)
Discussion started by: trey85stang
0 Replies
6. Shell Programming and Scripting
hi,
i have a variable which contains some file names delimited by a single space.
FNAME="s1.txt s2.lst s3.cvs s4.lst"
i have another variable that contains a pattern
FILE_PATTERN="*.lst"
i want to take the filenames from FNAME variable and assign each file name in to an array say
for... (8 Replies)
Discussion started by: Little
8 Replies
7. Shell Programming and Scripting
Hi Forum.
I have the following script that I would like to use a variable to search using awk but it's not working as expected:
# Define working variables
token_search_string=536088
token_search_length=16
This code example works by hardcoding 536088 in the string search:
awk -v... (10 Replies)
Discussion started by: pchang
10 Replies
8. UNIX for Beginners Questions & Answers
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
9. Shell Programming and Scripting
Hello,
We have wrote shell script for multiple file name search pattern.
file format: <numner>_<20180809>.txt
starting with single number and ending with 8 digits number
Command:
awk -v string="12_1234" -v serch="^+_+$" "BEGIN{ if (string ~/serch$/) print string }"
If sting matches... (4 Replies)
Discussion started by: koti_rama
4 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I have a working script.
It does what I am intending it to but a bit confused whether the sed part is supposed to be working or not. Further down is the script with the sed part that should have been working but not and the grep -v part which is the workaround that I am using at the... (10 Replies)
Discussion started by: newbie_01
10 Replies
LEARN ABOUT DEBIAN
ropkg::rsync::logparser
RoPkg::Rsync::LogParser(3pm) User Contributed Perl Documentation RoPkg::Rsync::LogParser(3pm)
NAME
RoPkg::Rsync::LogParser - a rsync log parser class
SYNOPSIS
#!/usr/bin/perl
use strict;
use warning;
sub main {
my $lp = new RoPkg::Rsync::LogParser( type => 'client' );
$lp->Parse('/tmp/debian-log.txt');
}
main();
Short description
RoPkg::Rsync::LogParser is a class used to parse (for the moment) client side rsync logs. Using this class you can extract the transfered
files, symlinks created, directories, total number of files, transfered bytes, speed of transfer etc. LogParser support list filter trough
probes (used by many projects to verify the mirrors). The primary use of this class is inside Simba, but can be used without problems in
any other project who needs a rsync client log parser.
METHODS
new(hash)
Constructor of the class. When creating a new class instance you must provide the type of log: client or server . For the moment only the
client parsing routines are defined.
Log($raw_log)
Get/Set the raw rsync log. With no parameters, the get behaviour is selected. If a parameter is present (and valid) the method acts as a
Set method.
Probes(@probes_list)
Get/Set the raw probes list. If no parameter is present, the method returns the number of probes defined (0 if none). If a list of probes
is given, the list is added to the existing list of probes.
Parse($filename)
Parse a rsync client log. If no filename is specified, the method parses the log previsiously set with Log() method. Please take extra care
with the filename. If it does not exists, or is not a file a exception will be raised (Param::Wrong and File::Open).
Files()
In scalar context returns the number of transfered files (filtered by probes list). In list context, returns the list of transfered files.
RealFiles()
In scalar context returns the number of transfered files. In list context, returns the list of transfered files.
Deleted()
In scalar context returns the number of deleted files (filtered by probes list). In list context, returns the list of deleted files.
RealDeleted()
In scalar context returns the number of deleted files. In list context, returns the list of deleted files.
Speed()
Returns the speed (as reported by rsync [in bytes/sec]) of the transfer.
Size()
Returns the size of the synced content.
TransfData()
Returns the total number of bytes transfered during the sync session
Symlinks()
In scalar context returns the number of symlinks (filtered by probes list). In list context, returns the list of symlinks.
RealSymlinks()
In scalar context returns the number of symlinks. In list context, returns the list of symlinks.
PREREQUISITES
RoPkg::Utils requires perl 5.008 or later and RoPkg::Exceptions class. From CPAN, you need the Scalar::Util module. At build time
Test::More is required for tests (if you don't plan to use the tests ignore this dependency).
SEE ALSO
RoPkg::Rsync::Node RoPkg::Rsync::ConfFile RoPkg::Exceptions
AUTHOR
Subredu Manuel <diablo@iasi.roedu.net>
LICENSE
Copyright (C) 2005 Subredu Manuel. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the
same terms as Perl itself. The LICENSE file contains the full text of the license.
perl v5.8.8 2006-06-09 RoPkg::Rsync::LogParser(3pm)